diff options
| author | hathach <[email protected]> | 2018-03-31 14:09:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-31 14:09:48 +0700 |
| commit | 7a77aed8fa67cf6740943cf25a00485d4f288cfb (patch) | |
| tree | b2579f69d1bd263ceed4701193412df5da7ff6c3 /tinyusb/class/hid | |
| parent | f1f7153b3b469d2565d5f5b5b8feb932ad219b98 (diff) | |
change usbd_control_xfer_st from function to macro to prevent compiler issue with substask
Diffstat (limited to 'tinyusb/class/hid')
| -rw-r--r-- | tinyusb/class/hid/hid_device.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tinyusb/class/hid/hid_device.c b/tinyusb/class/hid/hid_device.c index cd40dd86c..6790ef739 100644 --- a/tinyusb/class/hid/hid_device.c +++ b/tinyusb/class/hid/hid_device.c @@ -192,8 +192,6 @@ tusb_error_t hidd_control_request_st(uint8_t rhport, tusb_control_request_t cons OSAL_SUBTASK_BEGIN
- tusb_error_t err;
-
//------------- STD Request -------------//
if (p_request->bmRequestType_bit.type == TUSB_REQ_TYPE_STANDARD)
{
@@ -209,7 +207,7 @@ tusb_error_t hidd_control_request_st(uint8_t rhport, tusb_control_request_t cons // copy to allow report descriptor not to be in USBRAM
memcpy(m_hid_buffer, p_hid->p_report_desc, p_hid->report_length);
- STASK_INVOKE( usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, m_hid_buffer, p_hid->report_length), err );
+ usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, m_hid_buffer, p_hid->report_length);
}else
{
dcd_control_stall(rhport);
@@ -227,14 +225,13 @@ tusb_error_t hidd_control_request_st(uint8_t rhport, tusb_control_request_t cons &p_buffer, p_request->wLength);
STASK_ASSERT( p_buffer != NULL && actual_length > 0 );
- STASK_INVOKE( usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, p_buffer, actual_length), err );
+ usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, p_buffer, actual_length);
}
else if ( (HID_REQUEST_CONTROL_SET_REPORT == p_request->bRequest) && (p_driver->set_report_cb != NULL) )
{
// return TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT; // TODO test STALL control out endpoint (with mouse+keyboard)
// wValue = Report Type | Report ID
- STASK_INVOKE( usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, m_hid_buffer, p_request->wLength), err );
- STASK_ASSERT_ERR(err);
+ usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, m_hid_buffer, p_request->wLength);
p_driver->set_report_cb(rhport, u16_high_u8(p_request->wValue), m_hid_buffer, p_request->wLength);
}
|
