summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_host.h
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-08-20 22:21:30 +0700
committerGitHub <[email protected]>2021-08-20 22:21:30 +0700
commit58477b71f2989bc24480cb6e90dfd61506ec0ccd (patch)
treed4ae041de9cf357208d8afc39eb91dc3ddeca28e /src/class/hid/hid_host.h
parentaab133ac69aaf371b5270850588e5d1cd6fb6de1 (diff)
parentbeb1a5c678dd50c3142d2c74a29e92affa0b06c9 (diff)
Merge pull request #1035 from hathach/improve-host-stack
Improve host stack
Diffstat (limited to 'src/class/hid/hid_host.h')
-rw-r--r--src/class/hid/hid_host.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/class/hid/hid_host.h b/src/class/hid/hid_host.h
index ef203123d..9a498afec 100644
--- a/src/class/hid/hid_host.h
+++ b/src/class/hid/hid_host.h
@@ -97,6 +97,8 @@ uint8_t tuh_hid_parse_report_descriptor(tuh_hid_report_info_t* reports_info_arr,
// Invoked when device with hid interface is mounted
// Report descriptor is also available for use. tuh_hid_parse_report_descriptor()
// can be used to parse common/simple enough descriptor.
+// Note: if report descriptor length > CFG_TUH_ENUMERATION_BUFSIZE, it will be skipped
+// therefore report_desc = NULL, desc_len = 0
void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* report_desc, uint16_t desc_len);
// Invoked when device with hid interface is un-mounted
@@ -119,11 +121,11 @@ TU_ATTR_WEAK void tuh_hid_set_protocol_complete_cb(uint8_t dev_addr, uint8_t ins
//--------------------------------------------------------------------+
// Internal Class Driver API
//--------------------------------------------------------------------+
-void hidh_init (void);
-uint16_t hidh_open (uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *desc_itf, uint16_t max_len);
-bool hidh_set_config (uint8_t dev_addr, uint8_t itf_num);
-bool hidh_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
-void hidh_close (uint8_t dev_addr);
+void hidh_init (void);
+bool hidh_open (uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *desc_itf, uint16_t max_len);
+bool hidh_set_config (uint8_t dev_addr, uint8_t itf_num);
+bool hidh_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
+void hidh_close (uint8_t dev_addr);
#ifdef __cplusplus
}