|
请教FAE,使用CUbeMX建立USB_HOST工程,已经能够识别鼠标和键盘,也能收到数据。但是接上电磁屏(HID设备,类似鼠标),不能接收数据是什么原因? 设备已经连接成功了如下: USB Device Connected USB Device Reset Completed PID: 6dh VID: 256ch Address (#1) assigned. Manufacturer : GAOMON Product : Gaomon Tablet Serial Number : Enumeration done. This device has only 1 configuration. Default configuration set. Device remote wakeup enabled Switching to Interface (#0) Class : 3h SubClass : 1h Protocol : 2h Mouse device found! HID class started. |
【福利三:雨露均沾·逢7狂欢】之四:用一个定时器同步另外两个定时器输出PWM
【逢7发帖赢大礼】STM32开发之WIFI实时时钟
【逢7发帖赢大礼】STM32开发之指纹识别!
【逢7发帖赢大礼】STM32开发之环境空气质量监测
【逢7发帖赢大礼】STM32开发之人体实时运动信息监测!
【逢7发帖赢大礼】STM32开发之IC门禁卡UID读取方法!
【逢7发帖赢大礼】全网最简单的Arduino_STM32开发环境搭建教程!
STM32F4中文用户手册
STM32F400、STM32F402 Cortex-M4超值单片机
最全USB HID开发资料,悉心整理一个月,亲自测试
微信公众号
手机版
十分感谢 能具体一点吗?在usbh_ioreq.c usbh_core.c usbh_ctlreq.c usbh_pipes.c usbh_hid.c的哪个文件里面改?
bLength: 12h
bDescriptorType: 1h
bcdUSB: 200h
bDeviceClass: 0h
bDeviceSubClass: 0h
bDeviceProtocol: 0h
bMaxPacketSize: 8h
bDeviceClass: 0h
PID: 6dh
VID: 256ch
bcdDevice: 100h
iManufacturer: 1h
iProduct: 2h
iSerialNumber: 3h
bNumConfigurations: 1h
Address (#1) assigned.
bLength: 9h
bDescriptorType: 2h
wTotalLength: 3bh
bDescriptorType: 2h
bNumInterfaces: 2h
bConfigurationValue: 1h
iConfiguration: 0h
bmAttributes: a0h
bMaxPower: f0h
Itf_Desc[0].bLength: 9h
Itf_Desc[0].bDescriptorType: 4h
Itf_Desc[0].bInterfaceNumber: 0h
Itf_Desc[0].bAlternateSetting: 0h
Itf_Desc[0].bNumEndpoints: 1h
Itf_Desc[0].bInterfaceClass: 3h
Itf_Desc[0].bInterfaceSubClass: 1h
Itf_Desc[0].bInterfaceProtocol: 2h
Itf_Desc[0].iInterface: 0h
Itf_Desc[0].Ep_Desc.bLength: 7h
Itf_Desc[0].Ep_Desc.bDescriptorType: 5h
Itf_Desc[0].Ep_Desc.bEndpointAddress: 81h
Itf_Desc[0].Ep_Desc.bmAttributes: 3h
Itf_Desc[0].Ep_Desc.wMaxPacketSize: 40h
Itf_Desc[0].Ep_Desc.bInterval: 2h
Itf_Desc[1].bLength: 9h
Itf_Desc[1].bDescriptorType: 4h
Itf_Desc[1].bInterfaceNumber: 1h
Itf_Desc[1].bAlternateSetting: 0h
Itf_Desc[1].bNumEndpoints: 1h
Itf_Desc[1].bInterfaceClass: 3h
Itf_Desc[1].bInterfaceSubClass: 1h
Itf_Desc[1].bInterfaceProtocol: 2h
Itf_Desc[1].iInterface: 0h
Itf_Desc[1].Ep_Desc.bLength: 7h
Itf_Desc[1].Ep_Desc.bDescriptorType: 5h
Itf_Desc[1].Ep_Desc.bEndpointAddress: 82h
Itf_Desc[1].Ep_Desc.bmAttributes: 3h
Itf_Desc[1].Ep_Desc.wMaxPacketSize: 10h
Itf_Desc[1].Ep_Desc.bInterval: 2h
Manufacturer : GAOMON
Product : Gaomon Tablet
Serial Number :
Enumeration done.
This device has only 1 configuration.
Default configuration set.
Device remote wakeup enabled
interface;0
Switching to Interface (#0)
Class : 3h
SubClass : 1h
Protocol : 2h
Mouse device found!
HID class started.
HID_Handle->HID_Desc.bLength:9h
HID_Handle->HID_Desc.bDescriptorType:21h
HID_Handle->HID_Desc.bcdHID:111h
HID_Handle->HID_Desc.bCountryCode:0h
HID_Handle->HID_Desc.bNumDescriptors:1h
HID_Handle->HID_Desc.bReportDescriptorType:22h
HID_Handle->HID_Desc.wItemLength:12h
报告描述符如下:
0x06 0x00 0xff
0x09 0x01
0xa1 0x01
0x85 0x08
0x75 0x58
0x95 0x01
0x09 0x01
0x81 0x02
0xc0 0xff
2、函数 status = USBH_HID_GetReport(phost, 0x01U, 0U, HID_Handle->pData, (uint8_t)HID_Handle->length); 返回的一直是USBH_BUSY
3、设备有两个接口描述符,STM32的USB_LIb不支持两个接口的设备?