diff options
| author | hathach <[email protected]> | 2021-08-20 18:26:56 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-08-20 18:26:56 +0700 |
| commit | 62f2efbe8cf1e61f70660abac28f4226bca93daf (patch) | |
| tree | cbd993a9520e94c4617192b02c1332c80365c1d8 /examples | |
| parent | 1cef2b6a42d93704847c1a6ab82617e5baf04f4a (diff) | |
hid host skip get report descriptor if too large instead of assert
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/host/cdc_msc_hid/src/hid_app.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/host/cdc_msc_hid/src/hid_app.c b/examples/host/cdc_msc_hid/src/hid_app.c index 420600f9a..5e3ac6a72 100644 --- a/examples/host/cdc_msc_hid/src/hid_app.c +++ b/examples/host/cdc_msc_hid/src/hid_app.c @@ -61,6 +61,8 @@ void hid_app_task(void) // Invoked when device with hid interface is mounted // Report descriptor is also available for use. tuh_hid_parse_report_descriptor() // can be used to parse common/simple enough descriptor. +// Note: if report descriptor length > CFG_TUH_ENUMERATION_BUFSIZE, it will be skipped +// therefore report_desc = NULL, desc_len = 0 void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_report, uint16_t desc_len) { printf("HID device address = %d, instance = %d is mounted\r\n", dev_addr, instance); |
