From c729db229422a2771be394ea4ac8de65eac619e4 Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 28 Jul 2018 18:14:30 +0700 Subject: beter hid report --- src/class/hid/hid_device.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/class') diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 0b4116009..e0ed2e719 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -287,6 +287,7 @@ tusb_error_t hidd_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, u *p_len = 0; + /*------------- Boot protocol only keyboard & mouse -------------*/ if (desc_itf->bInterfaceSubClass == HID_SUBCLASS_BOOT) { TU_ASSERT(desc_itf->bInterfaceProtocol == HID_PROTOCOL_KEYBOARD || desc_itf->bInterfaceProtocol == HID_PROTOCOL_MOUSE, ERR_TUD_INVALID_DESCRIPTOR); @@ -326,6 +327,7 @@ tusb_error_t hidd_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, u *p_len = sizeof(tusb_desc_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + sizeof(tusb_desc_endpoint_t); } + /*------------- Generic (multiple report) -------------*/ else { // TODO HID generic -- cgit v1.3.1