Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions cores/rp2040/sdkoverride/tusb_gamepad16.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,4 @@
HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\
HID_COLLECTION_END \

// HID Gamepad Protocol Report.
typedef struct TU_ATTR_PACKED {
int16_t x; ///< Delta x movement of left analog-stick
int16_t y; ///< Delta y movement of left analog-stick
int16_t z; ///< Delta z movement of right analog-joystick
int16_t rz; ///< Delta Rz movement of right analog-joystick
int16_t rx; ///< Delta Rx movement of analog left trigger
int16_t ry; ///< Delta Ry movement of analog right trigger
uint8_t hat; ///< Buttons mask for currently pressed buttons in the DPad/hat
uint32_t buttons; ///< Buttons mask for currently pressed buttons
} hid_gamepad16_report_t;
#include "tusb_gamepad16_report.h"
15 changes: 15 additions & 0 deletions cores/rp2040/sdkoverride/tusb_gamepad16_report.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include <stdint.h>

// HID Gamepad Protocol Report.
typedef struct TU_ATTR_PACKED {
int16_t x; ///< Delta x movement of left analog-stick
int16_t y; ///< Delta y movement of left analog-stick
int16_t z; ///< Delta z movement of right analog-joystick
int16_t rz; ///< Delta Rz movement of right analog-joystick
int16_t rx; ///< Delta Rx movement of analog left trigger
int16_t ry; ///< Delta Ry movement of analog right trigger
uint8_t hat; ///< Buttons mask for currently pressed buttons in the DPad/hat
uint32_t buttons; ///< Buttons mask for currently pressed buttons
} hid_gamepad16_report_t;
2 changes: 1 addition & 1 deletion libraries/HID_Joystick
1 change: 1 addition & 0 deletions libraries/Joystick/src/Joystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "tusb.h"
#include "class/hid/hid_device.h"
#include <sdkoverride/tusb_gamepad16.h>

static const uint8_t desc_hid_report_joystick[] = { TUD_HID_REPORT_DESC_GAMEPAD16(HID_REPORT_ID(1)) };

Expand Down
1 change: 0 additions & 1 deletion libraries/Joystick/src/Joystick.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#endif

#include <HID_Joystick.h>
#include <class/hid/hid.h>

//======================================================================
class Joystick_ : public HID_Joystick {
Expand Down