summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2022-03-11 10:33:50 +0700
committerGitHub <[email protected]>2022-03-11 10:33:50 +0700
commit69ef918021b1c4c97db3bfa41f73b0348ec617c8 (patch)
treeba5d86fd18e1e674c0012306c3e9e0bafc03ba20 /src/class/hid
parentec6a8f00ad98f1f66b13a24329c33c009191cc8e (diff)
parenta715077b1079993f4cd01bbf54b8166a6612b29b (diff)
Merge pull request #1393 from hathach/more-host-bare-api
More host enhancement
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_host.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c
index 9190642c6..323debe69 100644
--- a/src/class/hid/hid_host.c
+++ b/src/class/hid/hid_host.c
@@ -409,22 +409,7 @@ static bool config_get_report_desc(uint8_t dev_addr, tusb_control_request_t cons
config_driver_mount_complete(dev_addr, instance, NULL, 0);
}else
{
- TU_LOG2("HID Get Report Descriptor\r\n");
- tusb_control_request_t const new_request =
- {
- .bmRequestType_bit =
- {
- .recipient = TUSB_REQ_RCPT_INTERFACE,
- .type = TUSB_REQ_TYPE_STANDARD,
- .direction = TUSB_DIR_IN
- },
- .bRequest = TUSB_REQ_GET_DESCRIPTOR,
- .wValue = tu_u16(hid_itf->report_desc_type, 0),
- .wIndex = itf_num,
- .wLength = hid_itf->report_desc_len
- };
-
- TU_ASSERT(tuh_control_xfer(dev_addr, &new_request, usbh_get_enum_buf(), config_get_report_desc_complete));
+ TU_ASSERT(tuh_descriptor_get_hid_report(dev_addr, itf_num, hid_itf->report_desc_type, usbh_get_enum_buf(), hid_itf->report_desc_len, config_get_report_desc_complete));
}
return true;