diff options
| author | Xudong Zheng <[email protected]> | 2023-08-27 15:21:15 -0400 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-11-24 18:27:03 +0700 |
| commit | 2fed722b0004e64667df526043f3bfcb131d3ee3 (patch) | |
| tree | 015b7bdaf63a1596de459ef7e61cf7427730047f /src/class/hid/hid_host.h | |
| parent | f03f60eae2894993373b48e2104bf02116bef1fa (diff) | |
add tuh_hid_set_default_protocol() to set default USB host HID protocol
Diffstat (limited to 'src/class/hid/hid_host.h')
| -rw-r--r-- | src/class/hid/hid_host.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/class/hid/hid_host.h b/src/class/hid/hid_host.h index 08ad421d2..3c59e301d 100644 --- a/src/class/hid/hid_host.h +++ b/src/class/hid/hid_host.h @@ -97,6 +97,11 @@ uint8_t tuh_hid_parse_report_descriptor(tuh_hid_report_info_t* reports_info_arr, // Application can use set_protocol() to switch back to Report protocol. uint8_t tuh_hid_get_protocol(uint8_t dev_addr, uint8_t idx); +// Device by default is initialized in Boot protocol for simplicity. Application +// can use this to modify the default protocol before calling tuh_init(), or use +// set_protocol() to change the protocol after initialization. +void tuh_hid_set_default_protocol(uint8_t protocol); + // Set protocol to HID_PROTOCOL_BOOT (0) or HID_PROTOCOL_REPORT (1) // This function is only supported by Boot interface (tuh_n_hid_interface_protocol() != NONE) bool tuh_hid_set_protocol(uint8_t dev_addr, uint8_t idx, uint8_t protocol); |
