diff options
| author | hathach <[email protected]> | 2021-02-08 19:08:16 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-02-08 19:08:16 +0700 |
| commit | 72bcc0685c142c512f1d04ff18eaa13b99f62e93 (patch) | |
| tree | b36872f041eaf75cda5dc4723745f01938fc729b /src/class/hid/hid_device.h | |
| parent | b2019e4d719a8b4560714081e5764525308b2924 (diff) | |
add tud_hid_n_gamepad_report() helper for gamepad report
- Add gamepad to hid_composite example. Though it needs a bit of extra
work but it will come later as separated PR.
Diffstat (limited to 'src/class/hid/hid_device.h')
| -rw-r--r-- | src/class/hid/hid_device.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h index f429d8b9a..a92dc14e0 100644 --- a/src/class/hid/hid_device.h +++ b/src/class/hid/hid_device.h @@ -71,6 +71,10 @@ bool tud_hid_n_keyboard_report(uint8_t itf, uint8_t report_id, uint8_t modifier, // use template layout report as defined by hid_mouse_report_t bool tud_hid_n_mouse_report(uint8_t itf, uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal); +// Gamepad: convenient helper to send mouse report if application +// use template layout report TUD_HID_REPORT_DESC_GAMEPAD +bool tud_hid_n_gamepad_report(uint8_t itf, uint8_t report_id, int8_t x, int8_t y, int8_t z, int8_t rz, int8_t rx, int8_t ry, uint8_t hat, uint16_t buttons); + //--------------------------------------------------------------------+ // Application API (Single Port) //--------------------------------------------------------------------+ @@ -119,6 +123,8 @@ TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t idle_rate); #endif +// TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t itf, ); + //--------------------------------------------------------------------+ // Inline Functions |
