STM32F103C8 Serial to USB HID Keyboard Mouse Joystick 串口转USB源码

上传者: hmjack2008 | 上传时间: 2021-03-12 12:12:45 | 文件大小: 295KB | 文件类型: ZIP
STM32F103C8 Serial(UART) to USB HID Keyboard Mouse Joystick 串口 转 USB键盘;鼠标;手柄 (1) 使用Composite Device 组合(复合)设备 (1.1) 1个Device -> 1个 Configuation -> 3个Interfance (Keyboard & Mouse & Joystick) (1.2) 支持BIOS模式中的操作(使用HID boot模式) 以便兼容在计算器中设定BIOS : (1.2.1) Keyboard Interfance -> HID (boot mode) -> 2个Endpoint(IN_0x81 & OUT_0x01) -> KeyboardReportDescriptor(不使用Report ID) (1.2.2) Mouse Interfance -> HID (boot mode) -> 1个Endpoint(IN_0x82) -> MouseReportDescriptor(不使用Report ID) (1.3) 支持Windows模式中的操作(使用Report ID) : (1.3.1) Multimedia Keyboard Interfance -> HID -> 1个Endpoint(IN_0x85) -> KeyboardReportDescriptor(使用Report ID) (1.3.1.1) Report ID (1) : HID Usage Page 0x0C, MediaKey (1.3.1.2) Report ID (2) : HID Usage Page 0x01, PowerControl (1.3.2) Mouse Interfance -> HID (boot mode) -> 1个Endpoint(IN_0x84) -> MouseReportDescriptor(使用Report ID) (1.3.2.1) Report ID (1) : 相对坐标 (-32768 ~ 32767) (1.3.2.2) Report ID (2) : 绝对坐标 (0 ~ 2048) (1.4) 支持反馈Keyboard_LED灯号: All Off; Num Lock; Caps Lock; Scroll Lock; Compose; Kana (1.5) Joystick Interfance -> HID -> 1个Endpoint(IN_0x83) -> JoyStickReportDescriptor (1.7) 支持GPIO命令, 可控制 12个GPIO 0/1 (hi/low)输出 (1.8) 支持Hardware或Software 插拔(Connect/Disconnect)命令 (1.9) 支持Software Reset命令 (2) 串口接收 命令 (2.1) UART协议: 115200, n, 8, 1 (2.2) 1帧发送字符串格式, 以 '{'开始, '}'结束 ','分隔 共10个10进制数字 例如: {1,2,3,4,5,6,7,8,9,10} (2.3) 第1位 区分 Keyboard(128) 或是 Mouse(64) 或是 Joystick(32) 或是 Control(32) 命令 Control_cmd = 0x10, Joystick_cmd = 0x20, Mouse_cmd = 0x40, MouseHold_cmd = 0x41, AbsMouse_cmd = 0x42, AbsMouseHold_cmd= 0x43, Keyboard_cmd = 0x80, KeyboardHold_cmd= 0x81, MediaKey_cmd = 0x82, MediaKeyHold_cmd= 0x83, Switch_cmd = 0xC0, SwitchHold_cmd = 0xC1 例如: {16, 0,0,0,0,0,0,0,0} --- 发送Control命令 {32, 0,0,0,0,0,0,0,0} --- 发送Joystick命令 {64, 0,0,0,0,0,0,0,0} --- 发送Mouse命令(相对坐标) {65, 0,0,0,0,0,0,0,0} --- 发送Mouse命令(相对坐标)(按住不放) {66, 0,0,0,0,0,0,0,0} --- 发送WinMouse命令(相对坐标/绝对坐标) {67, 0,0,0,0

文件下载

资源详情

[{"title":"( 48 个子文件 295KB ) STM32F103C8 Serial to USB HID Keyboard Mouse Joystick 串口转USB源码","children":[{"title":"STM32_USB_Composite_KeyboardMouseJoystick_AbsMouse_MediaKey_v20","children":[{"title":"keilkilll.bat <span style='color:#111;'> 399B </span>","children":null,"spread":false},{"title":"STM32F103_KMJ.pdf <span style='color:#111;'> 153.26KB </span>","children":null,"spread":false},{"title":"SYSTEM","children":[{"title":"sys","children":[{"title":"sys.c <span style='color:#111;'> 7.10KB </span>","children":null,"spread":false},{"title":"sys.h <span style='color:#111;'> 3.81KB </span>","children":null,"spread":false}],"spread":true},{"title":"delay","children":[{"title":"delay.c <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"delay.h <span style='color:#111;'> 970B </span>","children":null,"spread":false}],"spread":true},{"title":"usart","children":[{"title":"usart.c <span style='color:#111;'> 3.59KB </span>","children":null,"spread":false},{"title":"usart.h <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"USER","children":[{"title":"stm32f10x_conf.h <span style='color:#111;'> 6.05KB </span>","children":null,"spread":false},{"title":"DebugConfig","children":[{"title":"STM32F103C8_STM32F103C8_1.0.0.dbgconf <span style='color:#111;'> 6.79KB </span>","children":null,"spread":false}],"spread":true},{"title":"cortexm3_macro.h <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false},{"title":"stm32f10x_type.h <span style='color:#111;'> 3.31KB </span>","children":null,"spread":false},{"title":"UART_to_KeyMouseJoyS.uvprojx <span style='color:#111;'> 16.99KB </span>","children":null,"spread":false},{"title":"JLinkSettings.ini <span style='color:#111;'> 671B </span>","children":null,"spread":false},{"title":"stm32f10x_nvic.h <span style='color:#111;'> 18.75KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"UART_to_KeyMouseJoyS.hex <span style='color:#111;'> 44.16KB </span>","children":null,"spread":false}],"spread":true},{"title":"STM32F10x.s <span style='color:#111;'> 11.04KB </span>","children":null,"spread":false},{"title":"stm32f10x_map.h <span style='color:#111;'> 27.63KB </span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'> 26.26KB </span>","children":null,"spread":false},{"title":"UART_to_KeyMouseJoyS.uvoptx <span style='color:#111;'> 14.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"USB","children":[{"title":"LIB","children":[{"title":"usb_int.c <span style='color:#111;'> 6.32KB </span>","children":null,"spread":false},{"title":"usb_regs.c <span style='color:#111;'> 27.97KB </span>","children":null,"spread":false},{"title":"usb_mem.h <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"usb_def.h <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"usb_core.h <span style='color:#111;'> 8.80KB </span>","children":null,"spread":false},{"title":"usb_type.h <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"usb_int.h <span style='color:#111;'> 1.70KB </span>","children":null,"spread":false},{"title":"usb_mem.c <span style='color:#111;'> 3.34KB </span>","children":null,"spread":false},{"title":"usb_core.c <span style='color:#111;'> 30.05KB </span>","children":null,"spread":false},{"title":"usb_init.c <span style='color:#111;'> 2.71KB </span>","children":null,"spread":false},{"title":"usb_init.h <span style='color:#111;'> 2.48KB </span>","children":null,"spread":false},{"title":"usb_regs.h <span style='color:#111;'> 27.65KB </span>","children":null,"spread":false},{"title":"usb_lib.h <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false}],"spread":false},{"title":"CONFIG","children":[{"title":"usb_conf.h <span style='color:#111;'> 4.67KB </span>","children":null,"spread":false},{"title":"usb_istr.h <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false},{"title":"usb_pwr.h <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"stm32f10x_it.c <span style='color:#111;'> 26.79KB </span>","children":null,"spread":false},{"title":"hw_config.h <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"usb_desc.c <span style='color:#111;'> 25.24KB </span>","children":null,"spread":false},{"title":"usb_prop.h <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"hw_config.c <span style='color:#111;'> 9.30KB </span>","children":null,"spread":false},{"title":"usb_desc.h <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"usb_prop.c <span style='color:#111;'> 19.78KB </span>","children":null,"spread":false},{"title":"platform_config.h <span style='color:#111;'> 5.43KB </span>","children":null,"spread":false},{"title":"usb_istr.c <span style='color:#111;'> 5.54KB </span>","children":null,"spread":false},{"title":"usb_pwr.c <span style='color:#111;'> 6.98KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"STM32KMJ00.png <span style='color:#111;'> 61.83KB </span>","children":null,"spread":false},{"title":"STM32F103_KMJ.txt <span style='color:#111;'> 11.33KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明