summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-05-11 22:18:40 +0700
committerhathach <[email protected]>2023-05-16 11:09:22 +0700
commit1c4f22a54cf60e6221995f9b64e2e765fd0a5bfe (patch)
tree56505cbd61313df6bc09382e31c3d7aacb5aef72 /src/class
parent206d63e038744b228cfa6051d701cab50b520fe6 (diff)
EHCI: fix xfer failed with disconnected device as stalled
- change CFG_TUH_ENDPOINT_MAX to 16 (max endpoint pair per device) if not defined - change QHD_MAX for EHCI, should be user configurable and more optimized in the future
Diffstat (limited to 'src/class')
-rw-r--r--src/class/hid/hid_host.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c
index 3a491937a..6abe298e5 100644
--- a/src/class/hid/hid_host.c
+++ b/src/class/hid/hid_host.c
@@ -72,7 +72,7 @@ tu_static hidh_interface_t _hidh_itf[CFG_TUH_HID];
TU_ATTR_ALWAYS_INLINE static inline
hidh_interface_t* get_hid_itf(uint8_t daddr, uint8_t idx)
{
- TU_ASSERT(daddr && idx < CFG_TUH_HID, NULL);
+ TU_ASSERT(daddr > 0 && idx < CFG_TUH_HID, NULL);
hidh_interface_t* p_hid = &_hidh_itf[idx];
return (p_hid->daddr == daddr) ? p_hid : NULL;
}