diff options
| author | hathach <[email protected]> | 2020-09-05 14:59:07 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-09-05 14:59:07 +0700 |
| commit | 9531e47d10915b652c2c5cff9ef2956889639f93 (patch) | |
| tree | 3f995658f15ceba05a5af8918f7cf0af5500b826 /src/class | |
| parent | f7cf8cdf27a016093df65c0de7167685e407d014 (diff) | |
update example to test with mouse
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/hid/hid_host.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index e17bfc9e5..d9ed1f651 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -173,7 +173,8 @@ bool hidh_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t c tusb_desc_endpoint_t const * p_endpoint_desc = (tusb_desc_endpoint_t const *) p_desc; TU_ASSERT(TUSB_DESC_ENDPOINT == p_endpoint_desc->bDescriptorType, TUSB_ERROR_INVALID_PARA); - //------------- SET IDLE (0) request -------------// + // SET IDLE = 0 request + // Device can stall if not support this request tusb_control_request_t request = { .bmRequestType_bit = { .recipient = TUSB_REQ_RCPT_INTERFACE, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_OUT }, .bRequest = HID_REQ_CONTROL_SET_IDLE, @@ -181,7 +182,7 @@ bool hidh_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t c .wIndex = p_interface_desc->bInterfaceNumber, .wLength = 0 }; - TU_ASSERT( usbh_control_xfer( dev_addr, &request, NULL ) ); + usbh_control_xfer( dev_addr, &request, NULL ); // TODO stall is valid #if 0 //------------- Get Report Descriptor TODO HID parser -------------// |
