diff options
| author | hathach <[email protected]> | 2013-11-21 12:47:55 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-11-21 12:47:55 +0700 |
| commit | 6887e5e642c71666d622d28b52e1d32fea67982c (patch) | |
| tree | 8bbb974398b88df45a16e1076c9d06ddb2814c3c /tinyusb/class/hid_device.c | |
| parent | d94efa60d62a6b6b1beecaf823ab67648563ea52 (diff) | |
refractor usbd-dcd callback, add bus event isr
Diffstat (limited to 'tinyusb/class/hid_device.c')
| -rw-r--r-- | tinyusb/class/hid_device.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tinyusb/class/hid_device.c b/tinyusb/class/hid_device.c index 662691946..4b184c9ad 100644 --- a/tinyusb/class/hid_device.c +++ b/tinyusb/class/hid_device.c @@ -124,7 +124,7 @@ void hidd_init(void) // TODO not implemented yet } -void hidd_bus_reset(uint8_t coreid) +void hidd_close(uint8_t coreid) { // TODO not implemented yet } @@ -148,6 +148,8 @@ tusb_error_t hidd_control_request(uint8_t coreid, tusb_control_request_t const * uint8_t const desc_type = u16_high_u8(p_request->wValue); uint8_t const desc_index = u16_low_u8 (p_request->wValue); + (void) desc_index; + ASSERT ( p_request->bRequest == TUSB_REQUEST_GET_DESCRIPTOR && desc_type == HID_DESC_TYPE_REPORT, TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT); @@ -170,6 +172,9 @@ tusb_error_t hidd_control_request(uint8_t coreid, tusb_control_request_t const * hid_request_report_type_t report_type = u16_high_u8(p_request->wValue); uint8_t report_id = u16_low_u8(p_request->wValue); + (void) report_id; + (void) report_type; + dcd_pipe_control_xfer(coreid, TUSB_DIR_HOST_TO_DEV, &set_report, p_request->wLength); } break; |
