summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_device.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 51bd153ec..64a57e90e 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -196,7 +196,14 @@ uint16_t hidd_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint1
memcpy(&p_hid->report_desc_len, &(p_hid->hid_descriptor->wReportLength), 2);
// Prepare for output endpoint
- if (p_hid->ep_out) TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_hid->epout_buf, sizeof(p_hid->epout_buf)), 0);
+ if (p_hid->ep_out)
+ {
+ if ( !usbd_edpt_xfer(rhport, p_hid->ep_out, p_hid->epout_buf, sizeof(p_hid->epout_buf)) )
+ {
+ TU_LOG1_FAILED();
+ TU_BREAKPOINT();
+ }
+ }
return sizeof(tusb_desc_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + desc_itf->bNumEndpoints*sizeof(tusb_desc_endpoint_t);
}