久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
MM32F103 USB應用實例Custom_HID通訊例程
[打印本頁]
作者:
ben.young
時間:
2020-7-30 16:39
標題:
MM32F103 USB應用實例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****/
復制代碼
所有資料51hei提供下載:
MM32F103_USB_Custom_HID.7z
(161.23 KB, 下載次數: 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://www.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
99免费在线视频
|
免费看欧美一级片
|
91香蕉视频在线观看
|
精品久久久久一区
|
91久久国产综合久久
|
一区二区日韩
|
欧美成人手机在线
|
日韩免费中文字幕
|
伊人精品在线
|
精品国产伦一区二区三区观看方式
|
狠狠久
|
欧美激情a∨在线视频播放 成人免费共享视频
|
欧美久操网
|
99热碰
|
欧日韩在线观看
|
91精品国产综合久久香蕉麻豆
|
特级黄一级播放
|
国产精品成人久久久久
|
亚洲免费在线观看
|
精品av久久久久电影
|
久久天堂
|
91久久综合
|
97精品超碰一区二区三区
|
一区二区三区国产精品
|
亚洲91精品
|
91在线免费视频
|
亚洲激情一级片
|
久久新视频
|
欧美日韩国产在线观看
|
中文字幕乱码一区二区三区
|
www.中文字幕.com
|
一级黄色片一级黄色片
|
www狠狠爱com
|
国产 日韩 欧美 在线
|
日韩免费在线视频
|
国产成人精品一区
|
久久99久久98精品免观看软件
|
久久成人免费观看
|
91视频电影
|
久久精品国产久精国产
|
亚洲喷水
|