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.
This commit is contained in:
hathach
2021-02-08 19:08:16 +07:00
parent b2019e4d71
commit 72bcc0685c
7 changed files with 65 additions and 15 deletions

View File

@@ -218,7 +218,7 @@ typedef enum
//GAMEPAD_BUTTON_ = TU_BIT(15), ///< Undefined button
}hid_gamepad_button_bm_t;
/// Standard Gamepad HAT/DPAD Buttons Bitmap (from Linux input event codes)
/// Standard Gamepad HAT/DPAD Buttons (from Linux input event codes)
typedef enum
{
GAMEPAD_HAT_CENTERED = 0, ///< DPAD_CENTERED
@@ -230,7 +230,7 @@ typedef enum
GAMEPAD_HAT_DOWN_LEFT = 6, ///< DPAD_DOWN_LEFT
GAMEPAD_HAT_LEFT = 7, ///< DPAD_LEFT
GAMEPAD_HAT_UP_LEFT = 8, ///< DPAD_UP_LEFT
}hid_gamepad_hat_bm_t;
}hid_gamepad_hat_t;
/// @}