This repository was archived by the owner on May 18, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ typedef struct TU_ATTR_PACKED
157
157
int8_t y ; /**< Current delta y movement of the gamepad joystick 1. */
158
158
int8_t z ; /**< Current delta z movement of the gamepad joystick 2. */
159
159
int8_t r_z ; /**< Current delta r_z movement of the gamepad joystick 2. */
160
- uint16_t hat ; /**< buttons mask for currently pressed buttons in the gamepad hat */
160
+ uint8_t hat ; /**< buttons mask for currently pressed buttons in the gamepad hat */
161
161
}hid_gamepad_report_t ;
162
162
163
163
/// Standard Gamepad Buttons Bitmap (from Linux input event codes)
@@ -178,7 +178,7 @@ typedef enum
178
178
GAMEPAD_BUTTON_MODE = TU_BIT (12 ), ///< Mode button
179
179
GAMEPAD_BUTTON_THUMBL = TU_BIT (13 ), ///< L3 button
180
180
GAMEPAD_BUTTON_THUMBR = TU_BIT (14 ), ///< R3 button
181
- GAMEPAD_BUTTON_ = TU_BIT (15 ), ///< Undefined button
181
+ // GAMEPAD_BUTTON_ = TU_BIT(15), ///< Undefined button
182
182
}hid_gamepad_button_bm_t ;
183
183
184
184
/// Standard Gamepad HAT/DPAD Buttons Bitmap (from Linux input event codes)
Original file line number Diff line number Diff line change @@ -276,13 +276,13 @@ TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t idle_rate);
276
276
HID_REPORT_COUNT ( 4 ) ,\
277
277
HID_REPORT_SIZE ( 8 ) ,\
278
278
HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\
279
- /* 16 bit Hat Button Map */ \
279
+ /* 8 bit Hat Button Map */ \
280
280
HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\
281
281
HID_USAGE ( HID_USAGE_DESKTOP_HAT_SWITCH ) ,\
282
- HID_LOGICAL_MIN ( 1 ) ,\
282
+ HID_LOGICAL_MIN ( 0 ) ,\
283
283
HID_LOGICAL_MAX ( 8 ) ,\
284
284
HID_PHYSICAL_MIN ( 0 ) ,\
285
- HID_PHYSICAL_MAX ( 315 ) ,\
285
+ HID_PHYSICAL_MAX_N ( 315 , 2 ) ,\
286
286
HID_REPORT_COUNT ( 1 ) ,\
287
287
HID_REPORT_SIZE ( 8 ) ,\
288
288
HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\
You can’t perform that action at this time.
0 commit comments