diff --git a/src/class/hid/hid.h b/src/class/hid/hid.h index 5c30f7585..c63b6f00b 100644 --- a/src/class/hid/hid.h +++ b/src/class/hid/hid.h @@ -87,7 +87,7 @@ typedef enum HID_REPORT_TYPE_INPUT, ///< Input HID_REPORT_TYPE_OUTPUT, ///< Output HID_REPORT_TYPE_FEATURE ///< Feature -}hid_report_enum_t; +}hid_report_type_t; /// HID Class Specific Control Request typedef enum diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 4d33c85d3..ab9ef3ad8 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -110,7 +110,7 @@ uint8_t tud_hid_n_interface_protocol(uint8_t instance) return _hidd_itf[instance].itf_protocol; } -bool tud_hid_n_get_protocol(uint8_t instance) +uint8_t tud_hid_n_get_protocol(uint8_t instance) { return _hidd_itf[instance].boot_mode ? HID_PROTOCOL_BOOT : HID_PROTOCOL_REPORT; } diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h index 2cc4a9546..b3701c7e0 100644 --- a/src/class/hid/hid_device.h +++ b/src/class/hid/hid_device.h @@ -134,7 +134,7 @@ static inline uint8_t tud_hid_interface_protocol(void) return tud_hid_n_interface_protocol(0); } -static inline bool tud_hid_get_protocol(void) +static inline uint8_t tud_hid_get_protocol(void) { return tud_hid_n_get_protocol(0); } @@ -156,7 +156,7 @@ static inline bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8 static inline bool tud_hid_gamepad_report(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) { - return tud_hid_n_gamepad_report(0, x, y, z, rz, rx, ry, hat, buttons); + return tud_hid_n_gamepad_report(0, report_id, x, y, z, rz, rx, ry, hat, buttons); } /* --------------------------------------------------------------------+