hid host skip get report descriptor if too large instead of assert

This commit is contained in:
hathach
2021-08-20 18:26:56 +07:00
parent 1cef2b6a42
commit 62f2efbe8c
4 changed files with 43 additions and 25 deletions

View File

@@ -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);