diff options
| author | hathach <[email protected]> | 2018-07-25 15:58:52 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-07-25 15:58:52 +0700 |
| commit | 1982886f87f87785fbc8b12dbc77393b0371bec2 (patch) | |
| tree | 58e588433bc5c740b40fd563039573b98373ab62 /src/class/hid/hid_device.h | |
| parent | c3b082ab20b1e61afc487925a48779e603ff7d63 (diff) | |
add control set boot protocol support and keyboard idle rate
- tud_hid_keyboard_is_boot_protocol()
- tud_hid_mouse_is_boot_protocol()
Diffstat (limited to 'src/class/hid/hid_device.h')
| -rw-r--r-- | src/class/hid/hid_device.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h index 659981a48..e8f5b40f4 100644 --- a/src/class/hid/hid_device.h +++ b/src/class/hid/hid_device.h @@ -61,6 +61,7 @@ * \note Application must not perform any action if the interface is not ready
*/
bool tud_hid_keyboard_ready(void);
+bool tud_hid_keyboard_is_boot_protocol(void);
bool tud_hid_keyboard_keycode(uint8_t modifier, uint8_t keycode[6]);
@@ -77,10 +78,9 @@ typedef struct{ extern const hid_ascii_to_keycode_entry_t HID_ASCII_TO_KEYCODE[128];
#endif
-/*------------- Callbacks -------------*/
+/*------------- Callbacks, ATTR_WEAK means optional -------------*/
-/** \brief Callback function that is invoked when USB host request \ref HID_REQUEST_CONTROL_GET_REPORT
- * via control endpoint.
+/** Callback invoked when USB host request \ref HID_REQ_CONTROL_GET_REPORT.
* \param[in] report_type specify which report (INPUT, OUTPUT, FEATURE) that host requests
* \param[out] buffer data that application need to update, value must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM)
* \param[in] reqlen number of bytes that host requested
@@ -93,8 +93,7 @@ extern const hid_ascii_to_keycode_entry_t HID_ASCII_TO_KEYCODE[128]; */
ATTR_WEAK uint16_t tud_hid_keyboard_get_report_cb(hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen);
-/** \brief Callback function that is invoked when USB host request \ref HID_REQUEST_CONTROL_SET_REPORT
- * via control endpoint.
+/** Callback invoked when USB host request \ref HID_REQ_CONTROL_SET_REPORT.
* \param[in] report_type specify which report (INPUT, OUTPUT, FEATURE) that host requests
* \param[in] buffer containing the report's data
* \param[in] bufsize number of bytes in the \a buffer
@@ -103,6 +102,9 @@ ATTR_WEAK uint16_t tud_hid_keyboard_get_report_cb(hid_report_type_t report_type, */
ATTR_WEAK void tud_hid_keyboard_set_report_cb(hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
+
+//ATTR_WEAK void tud_hid_keyboard_set_protocol_cb(bool boot_protocol);
+
/** @} */
/** @} */
@@ -120,6 +122,7 @@ ATTR_WEAK void tud_hid_keyboard_set_report_cb(hid_report_type_t report_type, uin * \note This function is primarily used for polling/waiting result after \ref tusbd_hid_mouse_send.
*/
bool tud_hid_mouse_ready(void);
+bool tud_hid_mouse_is_boot_protocol(void);
bool tud_hid_mouse_data(uint8_t buttons, int8_t x, int8_t y, int8_t scroll, int8_t pan);
@@ -161,6 +164,8 @@ ATTR_WEAK uint16_t tud_hid_mouse_get_report_cb(hid_report_type_t report_type, ui */
ATTR_WEAK void tud_hid_mouse_set_report_cb(hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
+//ATTR_WEAK void tud_hid_mouse_set_protocol_cb(bool boot_protocol);
+
/** @} */
/** @} */
|
