From 8614dcece7792aab34431156c499f778baafa7c3 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 15 Apr 2020 01:01:07 +0700 Subject: [PATCH] tested with hid --- src/class/hid/hid_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 7cb35f1ce..ca00cb942 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -160,6 +160,8 @@ void hidd_reset(uint8_t rhport) bool hidd_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint16_t *p_len) { + TU_VERIFY(desc_itf->bInterfaceClass == TUSB_CLASS_HID); + uint8_t const *p_desc = (uint8_t const *) desc_itf; // Find available interface