hathach 5 лет назад
Родитель
Сommit
a26752a93e
3 измененных файлов с 4 добавлено и 4 удалено
  1. 1 1
      src/class/hid/hid.h
  2. 1 1
      src/class/hid/hid_device.c
  3. 2 2
      src/class/hid/hid_device.h

+ 1 - 1
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

+ 1 - 1
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;
 }

+ 2 - 2
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);
 }
 
 /* --------------------------------------------------------------------+