Skip to content

Commit 21dfd20

Browse files
committed
stmhal: Fill in USB class/subclass/proto for CDC+HID device.
Also change HID device from keyboard to mouse (should have been mouse all along).
1 parent a64d5d6 commit 21dfd20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stmhal/usbdev/class/cdc_msc_hid/src/usbd_cdc_msc_hid.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ __ALIGN_BEGIN static uint8_t USBD_CDC_HID_CfgDesc[USB_CDC_HID_CONFIG_DESC_SIZ] _
229229
USB_DESC_TYPE_ASSOCIATION, // bDescriptorType: IAD
230230
CDC_IFACE_NUM, // bFirstInterface: first interface for this association
231231
0x02, // bInterfaceCount: nummber of interfaces for this association
232-
0x00, // bFunctionClass: ?
233-
0x00, // bFunctionSubClass: ?
234-
0x00, // bFunctionProtocol: ?
232+
0x02, // bFunctionClass: Communication Interface Class
233+
0x02, // bFunctionSubClass: Abstract Control Model
234+
0x01, // bFunctionProtocol: Common AT commands
235235
0x00, // iFunction: index of string for this function
236236

237237
//--------------------------------------------------------------------------
@@ -324,7 +324,7 @@ __ALIGN_BEGIN static uint8_t USBD_CDC_HID_CfgDesc[USB_CDC_HID_CONFIG_DESC_SIZ] _
324324
0x01, // bNumEndpoints
325325
0x03, // bInterfaceClass: HID Class
326326
0x01, // bInterfaceSubClass: 1=BOOT, 0=no boot
327-
0x01, // nInterfaceProtocol: 0=none, 1=keyboard, 2=mouse
327+
0x02, // nInterfaceProtocol: 0=none, 1=keyboard, 2=mouse
328328
0x00, // iInterface:
329329

330330
// HID descriptor

0 commit comments

Comments
 (0)