summaryrefslogtreecommitdiff
path: root/examples/device/cdc_msc_hid/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-05-02 14:30:49 +0700
committerhathach <[email protected]>2019-05-02 14:30:49 +0700
commitf9d9eebfe1dbf462a69e7d3a967b2ad103ae2277 (patch)
tree4f5850e95b0912f39f72dfc142ccf7076c164012 /examples/device/cdc_msc_hid/src
parent45b856e03bbf7cb02540b9e57c775a619d3f07b3 (diff)
support hid generic inout #58
- add report descriptor template TUD_HID_REPORT_DESC_GENERIC_INOUT - add TUD_HID_INOUT_DESCRIPTOR & TUD_HID_INOUT_DESC_LEN - add hid_generic_inout example
Diffstat (limited to 'examples/device/cdc_msc_hid/src')
-rw-r--r--examples/device/cdc_msc_hid/src/usb_descriptors.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/device/cdc_msc_hid/src/usb_descriptors.c b/examples/device/cdc_msc_hid/src/usb_descriptors.c
index c8fca571f..72d280c2f 100644
--- a/examples/device/cdc_msc_hid/src/usb_descriptors.c
+++ b/examples/device/cdc_msc_hid/src/usb_descriptors.c
@@ -117,19 +117,22 @@ enum
uint8_t const desc_configuration[] =
{
- // Config: self-powered with remote wakeup support, max power up to 100 mA
+ // Inteface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
#if CFG_TUD_CDC
+ // Interface number, string index, EP notification address and size, EP data address (out, in) and size.
TUD_CDC_DESCRIPTOR(ITF_NUM_CDC, 4, 0x81, 8, 0x02, 0x82, 64),
#endif
#if CFG_TUD_MSC
+ // Interface number, string index, EP Out & EP In address, EP size
TUD_MSC_DESCRIPTOR(ITF_NUM_MSC, 5, EPNUM_MSC, 0x80 | EPNUM_MSC, 64), // highspeed 512
#endif
#if CFG_TUD_HID
- TUD_HID_DESCRIPTOR(ITF_NUM_HID, 6, HID_PROTOCOL_KEYBOARD, sizeof(desc_hid_report), 0x84, 16, 10)
+ // Interface number, string index, protocol, report descriptor len, EP In address, size & polling interval
+ TUD_HID_DESCRIPTOR(ITF_NUM_HID, 6, HID_PROTOCOL_NONE, sizeof(desc_hid_report), 0x84, 16, 10)
#endif
};