summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-15 01:01:07 +0700
committerhathach <[email protected]>2020-04-15 01:01:07 +0700
commit8614dcece7792aab34431156c499f778baafa7c3 (patch)
tree3dbe99cd2702d3cd5f6530006206d2dbd38a6a6e /src/class
parent3ef6e33533c533ef52336fae66e784b7d85e612f (diff)
tested with hid
Diffstat (limited to 'src/class')
-rw-r--r--src/class/hid/hid_device.c2
1 files changed, 2 insertions, 0 deletions
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