summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-07-13 17:48:26 +0700
committerhathach <[email protected]>2018-07-13 17:48:26 +0700
commit1efb552bfd097a23651bbb5ad29b6d8eb3bc9ccd (patch)
tree2d6301a8058d3a631dde379515b3185992ab1422 /src/class/hid/hid_host.c
parentcd5b5d3a53adb465ac614b6027e16c8ec987b09e (diff)
add ep2drv, rename descriptor offset
Diffstat (limited to 'src/class/hid/hid_host.c')
-rw-r--r--src/class/hid/hid_host.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c
index 69f86ee0b..fe0b7748b 100644
--- a/src/class/hid/hid_host.c
+++ b/src/class/hid/hid_host.c
@@ -186,12 +186,12 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
//------------- HID descriptor -------------//
- p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH];
+ p_desc += p_desc[DESC_OFFSET_LEN];
tusb_hid_descriptor_hid_t const *p_desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
TU_ASSERT(HID_DESC_TYPE_HID == p_desc_hid->bDescriptorType, TUSB_ERROR_INVALID_PARA);
//------------- Endpoint Descriptor -------------//
- p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH];
+ p_desc += p_desc[DESC_OFFSET_LEN];
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);