diff options
| author | hathach <[email protected]> | 2014-03-23 00:00:23 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-23 00:00:23 +0700 |
| commit | 3a8dce013d0cf153f4c81f8ba891b5abc1b276fd (patch) | |
| tree | ed7414d9b5da402143820b0072b7fa6faa2a5fda /tinyusb/class | |
| parent | 1cdca167cd41f51ca587a265b41f79446d828e48 (diff) | |
remove IAD_DESC_REQUIRED
add compiler guard for exceeding number of endpoints for lpc11/13u
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/hid_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tinyusb/class/hid_device.c b/tinyusb/class/hid_device.c index 91fe0f9d6..e2fb9f62f 100644 --- a/tinyusb/class/hid_device.c +++ b/tinyusb/class/hid_device.c @@ -102,7 +102,8 @@ static hidd_class_driver_t const hidd_class_driver[HIDD_NUMBER_OF_SUBCLASS] = };
// TODO [HID] generic
-TUSB_CFG_ATTR_USBRAM uint8_t m_control_data[ MAX_OF(sizeof(hid_keyboard_report_t), sizeof(hid_mouse_report_t)) ];
+TUSB_CFG_ATTR_USBRAM
+static uint8_t m_control_report[ MAX_OF(sizeof(hid_keyboard_report_t), sizeof(hid_mouse_report_t)) ];
//--------------------------------------------------------------------+
// KEYBOARD APPLICATION API
@@ -228,13 +229,13 @@ tusb_error_t hidd_control_request_subtask(uint8_t coreid, tusb_control_request_t // wValue = Report Type | Report ID
tusb_error_t error;
- dcd_pipe_control_xfer(coreid, (tusb_direction_t) p_request->bmRequestType_bit.direction, m_control_data, p_request->wLength, true);
+ dcd_pipe_control_xfer(coreid, (tusb_direction_t) p_request->bmRequestType_bit.direction, m_control_report, p_request->wLength, true);
osal_semaphore_wait(usbd_control_xfer_sem_hdl, OSAL_TIMEOUT_NORMAL, &error); // wait for control xfer complete
SUBTASK_ASSERT_STATUS(error);
p_driver->set_report_cb(coreid, (hid_request_report_type_t) u16_high_u8(p_request->wValue),
- m_control_data, p_request->wLength);
+ m_control_report, p_request->wLength);
}
else if (HID_REQUEST_CONTROL_SET_IDLE == p_request->bRequest)
{
|
