久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
MM32F103 USB應(yīng)用實例Custom_HID通訊例程
[打印本頁]
作者:
ben.young
時間:
2020-7-30 16:39
標題:
MM32F103 USB應(yīng)用實例Custom_HID通訊例程
基于MM32F103 USB Custom_HID 通訊例程,基于32位 ARM Cortex M3 的MM32F103xBx8的例程
單片機源程序如下:
/* Includes ------------------------------------------------------------------*/
#include "MM32F103.h"
#include "usb_lib.h"
#include "hw_config.h"
#include "usbio.h"
#include "usb_regs.h"
#include "usb_pwr.h"
#include "usb_desc.h"
#include "sys.h"
#include "uart.h"
#include "delay.h"
#include "led.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Extern variables ----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
void Delay(__IO uint32_t nCount);
extern uint8_t Flag_Receive;
/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* Function Name : main.
* Description : main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
uint8_t table_data[64]={
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
};
int main(void)
{
delay_init();
uart_initwBaudRate(115200);
LED_Init();
Set_System();
USB_Interrupts_Config();
Set_USBClock();
USB_Init();
printf("System Initial Success\r\n");
while (1)
{
if(bDeviceState == CONFIGURED) //等待USB初始化完成
{
// if(Flag_Receive)
// {
//
// USB_Send_Buffer[0] = 0xaa;
// USB_Send_Buffer[1] = 0x55;
// USB_Send_Buffer[2] = 0xaa;
// USB_Send_Buffer[3] = 0x55;
// USB_Send_Buffer[4] = 0xaa;
// USB_Send_Buffer[5] = 0x55;
// USB_SendData(USB_Send_Buffer,64);
//
// Flag_Receive = 0;
//
// }
USB_SendData(table_data,5);
delay_ms(5000);
}
//USB_SendData(table_data,64);
}
}
/*******************************************************************************
* Function Name : Delay
* Description : Inserts a delay time.
* Input : nCount: specifies the delay time length.
* Output : None
* Return : None
*******************************************************************************/
void Delay(__IO uint32_t nCount)
{
for(; nCount!= 0;nCount--);
}
#ifdef USE_FULL_ASSERT
/*******************************************************************************
* Function Name : assert_failed
* Description : Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* Input : - file: pointer to the source file name
* - line: assert_param error line source number
* Output : None
* Return : None
*******************************************************************************/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while(1)
{
}
}
#endif
/******************* (C) COPYRIGHT 2009 Mindmotion *****END OF FILE****/
復(fù)制代碼
所有資料51hei提供下載:
MM32F103_USB_Custom_HID.7z
(161.23 KB, 下載次數(shù): 43)
2020-7-30 16:39 上傳
點擊文件名下載附件
USB HID
下載積分: 黑幣 -5
作者:
zyluglugl
時間:
2021-8-5 22:40
樓主,好像用這個的人很少呀?你是做宣傳的嗎?
作者:
zhu1980
時間:
2022-3-31 09:18
這個程序,我在WIN10上可用正常使用,在win7 和 XP上USB不能識別,是什么問題?
歡迎光臨 (http://m.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
午夜a√
|
亚洲国产情侣
|
亚洲国产精品成人久久久
|
免费能直接在线观看黄的视频
|
99国产精品久久久久久久
|
成人综合在线视频
|
波多野结衣二区
|
日韩成人免费视频
|
中文字幕 欧美 日韩
|
日韩成人在线免费视频
|
成人综合视频在线
|
精品国产乱码久久久久久果冻传媒
|
国产精品久久一区二区三区
|
欧美精品一区二区免费
|
91精品国产91久久综合桃花
|
国产欧美精品一区二区色综合
|
99精品欧美
|
www.久草
|
久久婷婷色
|
亚卅毛片
|
亚洲免费视频在线观看
|
亚洲一区二区三区四区在线观看
|
日本久草
|
午夜在线免费观看
|
亚洲不卡在线观看
|
国产精品美女久久久免费
|
中文字幕久久精品
|
日本久草视频
|
亚洲日产精品
|
在线视频成人
|
www.久久久久久久久久久
|
精品国产乱码一区二区三
|
欧美日韩久久精品
|
天堂色区
|
懂色中文一区二区三区在线视频
|
久久中文字幕电影
|
日韩和的一区二在线
|
欧美激情精品久久久久久
|
超碰在线亚洲
|
成人h视频在线观看
|
久久av一区二区三区
|