summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_host.c
diff options
context:
space:
mode:
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);