Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into onboard-manual-take-2
Browse files Browse the repository at this point in the history
  • Loading branch information
dylwhich committed Dec 16, 2022
2 parents db710d8 + ff683bd commit 57a5247
Show file tree
Hide file tree
Showing 9 changed files with 732 additions and 378 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ git submodule update --init --recursive
To set up the emulator build environment, you'll need to install the following packages. If your system uses the `apt` package manager, use this command:

```bash
sudo apt install build-essential xorg-dev libx11-dev libxinerama-dev libxext-dev mesa-common-dev libglu1-mesa-dev libasound2-dev libpulse-dev libasan
sudo apt install build-essential xorg-dev libx11-dev libxinerama-dev libxext-dev mesa-common-dev libglu1-mesa-dev libasound2-dev libpulse-dev libasan8
```

Or if your system uses the `dnf` package manager, use these commands:

```bash
sudo dnf group install "C Development Tools and Libraries" "Development Tools"
sudo dnf install libX11-devel libXinerama-devel libXext-devel mesa-libGLU-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel cmake libasan
sudo dnf install libX11-devel libXinerama-devel libXext-devel mesa-libGLU-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel cmake libasan8
```

## macOS
Expand Down
31 changes: 15 additions & 16 deletions components/tinyusb/tinyusb/src/class/hid/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,21 @@ typedef enum
/// Switch Gamepad Buttons Bitmap
typedef enum
{
GAMEPAD_NS_BUTTON_Y = 0x01, //TU_BIT(0), ///< A/South button
GAMEPAD_NS_BUTTON_B = 0x02, //TU_BIT(1), ///< B/East button
GAMEPAD_NS_BUTTON_A = 0x04, //TU_BIT(2), ///< C button
GAMEPAD_NS_BUTTON_X = 0x08, //TU_BIT(3), ///< X/North button
GAMEPAD_NS_BUTTON_TL = 0x10, //TU_BIT(4), ///< Y/West button
GAMEPAD_NS_BUTTON_TR = 0x20, //TU_BIT(5), ///< Z button //CAPTURE
GAMEPAD_NS_BUTTON_TL2 = 0x40, //TU_BIT(6), ///< L1 button
GAMEPAD_NS_BUTTON_TR2 = 0x80, //TU_BIT(7), ///< R1 button
GAMEPAD_NS_BUTTON_SELECT = 0x100, //TU_BIT(8), ///< L2 button
GAMEPAD_NS_BUTTON_START = 0x200, //TU_BIT(9), ///< R2 button
GAMEPAD_NS_BUTTON_THUMBL = 0x400, //TU_BIT(10), ///< Select button
GAMEPAD_NS_BUTTON_THUMBR = 0x800, //TU_BIT(11), ///< Start button
GAMEPAD_NS_BUTTON_MODE = 0x1000, //TU_BIT(12), ///< Mode button //UNUSED?
GAMEPAD_NS_BUTTON_C = 0x2000, //TU_BIT(13), ///< L3 button
GAMEPAD_NS_BUTTON_Z = 0x4000, //TU_BIT(14), ///< R3 button
//GAMEPAD_NS_BUTTON_ = TU_BIT(15), ///< Undefined button
GAMEPAD_NS_BUTTON_Y = 0x01,
GAMEPAD_NS_BUTTON_B = 0x02,
GAMEPAD_NS_BUTTON_A = 0x04,
GAMEPAD_NS_BUTTON_X = 0x08,
GAMEPAD_NS_BUTTON_TL = 0x10,
GAMEPAD_NS_BUTTON_TR = 0x20,
GAMEPAD_NS_BUTTON_TL2 = 0x40,
GAMEPAD_NS_BUTTON_TR2 = 0x80,
GAMEPAD_NS_BUTTON_MINUS = 0x100,
GAMEPAD_NS_BUTTON_PLUS = 0x200,
GAMEPAD_NS_BUTTON_THUMBL = 0x400,
GAMEPAD_NS_BUTTON_THUMBR = 0x800,
GAMEPAD_NS_BUTTON_HOME = 0x1000,
GAMEPAD_NS_BUTTON_CAPTURE = 0x2000,
GAMEPAD_NS_BUTTON_Z = 0x4000, ///UNUSED?
}hid_gamepad_ns_button_bm_t;

/// Standard Gamepad HAT/DPAD Buttons (from Linux input event codes)
Expand Down
2 changes: 1 addition & 1 deletion emu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ CFLAGS_WARNINGS_EXTRA = \
################################################################################

# Create a variable with the git hash and branch name
GIT_HASH = \"$(shell git rev-parse --short HEAD)\"
GIT_HASH = \"$(shell git rev-parse --short=7 HEAD)\"

# Used by the ESP SDK
DEFINES_LIST = \
Expand Down
8 changes: 4 additions & 4 deletions emu/src/idf-inc/tusb_hid_gamepad.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ typedef enum
#define GAMEPAD_NS_BUTTON_TR 0x20
#define GAMEPAD_NS_BUTTON_TL2 0x40
#define GAMEPAD_NS_BUTTON_TR2 0x80
#define GAMEPAD_NS_BUTTON_SELECT 0x100
#define GAMEPAD_NS_BUTTON_START 0x200
#define GAMEPAD_NS_BUTTON_MINUS 0x100
#define GAMEPAD_NS_BUTTON_PLUS 0x200
#define GAMEPAD_NS_BUTTON_THUMBL 0x400
#define GAMEPAD_NS_BUTTON_THUMBR 0x800
#define GAMEPAD_NS_BUTTON_MODE 0x1000
#define GAMEPAD_NS_BUTTON_C 0x2000
#define GAMEPAD_NS_BUTTON_HOME 0x1000
#define GAMEPAD_NS_BUTTON_CAPTURE 0x2000
#define GAMEPAD_NS_BUTTON_Z 0x4000

/// Standard Gamepad HAT/DPAD Buttons (from Linux input event codes)
Expand Down
2 changes: 1 addition & 1 deletion main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spiffs_create_partition_image(storage ../spiffs_image FLASH_IN_PROJECT)


execute_process(
COMMAND git rev-parse --short HEAD
COMMAND git rev-parse --short=7 HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_SHA1 )

Expand Down
Loading

0 comments on commit 57a5247

Please sign in to comment.