diff options
| author | hathach <[email protected]> | 2022-03-19 00:43:31 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-03-19 00:43:31 +0700 |
| commit | 4795cca04ac60d58fbc78d554cd7af7039cd310a (patch) | |
| tree | cd2ebf85439a5ab1634a3a72392ed8da8b8db119 /src/class/hid | |
| parent | ba1185bf28331da718cca38e6598361889fce54d (diff) | |
add parse config descriptor to example
move usbh_edpt_open() to public API, remove rhport from its signature
Diffstat (limited to 'src/class/hid')
| -rw-r--r-- | src/class/hid/hid.h | 2 | ||||
| -rw-r--r-- | src/class/hid/hid_host.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/class/hid/hid.h b/src/class/hid/hid.h index 940454bd9..44a464be1 100644 --- a/src/class/hid/hid.h +++ b/src/class/hid/hid.h @@ -43,7 +43,7 @@ /** \defgroup ClassDriver_HID_Common Common Definitions * @{ */ - /// USB HID Descriptor +/// USB HID Descriptor typedef struct TU_ATTR_PACKED { uint8_t bLength; /**< Numeric expression that is the total size of the HID descriptor */ diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index 2bdd1db79..2280e87b4 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -324,6 +324,7 @@ void hidh_close(uint8_t dev_addr) bool hidh_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *desc_itf, uint16_t max_len) { + (void) rhport; (void) max_len; TU_VERIFY(TUSB_CLASS_HID == desc_itf->bInterfaceClass); @@ -355,7 +356,7 @@ bool hidh_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *de for(int i = 0; i < desc_itf->bNumEndpoints; i++) { TU_ASSERT(TUSB_DESC_ENDPOINT == desc_ep->bDescriptorType); - TU_ASSERT( usbh_edpt_open(rhport, dev_addr, desc_ep) ); + TU_ASSERT( usbh_edpt_open(dev_addr, desc_ep) ); if(tu_edpt_dir(desc_ep->bEndpointAddress) == TUSB_DIR_IN) { |
