Add board config for Flatbox rev8 (#1410)
This commit is contained in:
8
.github/workflows/cmake.yml
vendored
8
.github/workflows/cmake.yml
vendored
@@ -27,6 +27,7 @@ on:
|
||||
- FlatboxRev5RGB
|
||||
- FlatboxRev5USBPassthrough
|
||||
- FlatboxRev5Southpaw
|
||||
- FlatboxRev8
|
||||
- Granola
|
||||
- KB2040
|
||||
- KeyboardConverter
|
||||
@@ -78,8 +79,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
GP2040_BOARDCONFIG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.board_config != '' && fromJSON(format('["{0}"]', github.event.inputs.board_config)) || fromJSON('["ARCController", "Blank", "Pico", "PicoW", "Pico2", "BentoBox", "DuelPadZen", "FlatboxRev4", "FlatboxRev5", "FlatboxRev5RGB", "FlatboxRev5USBPassthrough", "FlatboxRev5Southpaw", "Granola", "KB2040", "KeyboardConverter", "Haute42COSMOX", "Haute42COSMOXMLite", "Haute42COSMOXMUltra", "Haute42COSMOXXAnalog", "Liatris", "MavercadeRev1", "MavercadeRev2", "MiSTercadeV2", "OpenCore0", "OpenCore0MIXUP", "OpenCore0WASD", "OSUMGP-RP2040", "PicoAnn", "PicoFightingBoard", "PXPGamepad", "ReflexCtrlGenesis6", "ReflexCtrlNES", "ReflexCtrlSaturn", "ReflexCtrlSNES", "ReflexCtrlVB", "ReflexEncodeV1.2", "ReflexEncodeV2.0", "RP2040AdvancedBreakoutBoard", "RP2040AdvancedBreakoutBoardUSBPassthrough", "RP2040MiniBreakoutBoard", "RP2040MiniBreakoutBoardUSBPassthrough", "SeeedXIAORP2040", "SparkFunProMicro", "SparkFunProMicroRP2350", "WaveshareZero", "Stress", "SGFDevices", "ZeroRhythm"]') }}
|
||||
|
||||
GP2040_BOARDCONFIG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.board_config != '' && fromJSON(format('["{0}"]', github.event.inputs.board_config)) || fromJSON('["ARCController", "Blank", "Pico", "PicoW", "Pico2", "BentoBox", "DuelPadZen", "FlatboxRev4", "FlatboxRev5", "FlatboxRev5RGB", "FlatboxRev5USBPassthrough", "FlatboxRev5Southpaw", "FlatboxRev8", "Granola", "KB2040", "KeyboardConverter", "Haute42COSMOX", "Haute42COSMOXMLite", "Haute42COSMOXMUltra", "Haute42COSMOXXAnalog", "Liatris", "MavercadeRev1", "MavercadeRev2", "MiSTercadeV2", "OpenCore0", "OpenCore0MIXUP", "OpenCore0WASD", "OSUMGP-RP2040", "PicoAnn", "PicoFightingBoard", "PXPGamepad", "ReflexCtrlGenesis6", "ReflexCtrlNES", "ReflexCtrlSaturn", "ReflexCtrlSNES", "ReflexCtrlVB", "ReflexEncodeV1.2", "ReflexEncodeV2.0", "RP2040AdvancedBreakoutBoard", "RP2040AdvancedBreakoutBoardUSBPassthrough", "RP2040MiniBreakoutBoard", "RP2040MiniBreakoutBoardUSBPassthrough", "SeeedXIAORP2040", "SparkFunProMicro", "SparkFunProMicroRP2350", "WaveshareZero", "Stress", "SGFDevices", "ZeroRhythm"]') }}
|
||||
steps:
|
||||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v2
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
|
||||
- name: Pico Build Configure CMake
|
||||
shell: bash
|
||||
if: ${{ matrix.GP2040_BOARDCONFIG != 'PicoW' && matrix.GP2040_BOARDCONFIG != 'Pico2' && matrix.GP2040_BOARDCONFIG != 'SparkFunProMicroRP2350' }}
|
||||
if: ${{ matrix.GP2040_BOARDCONFIG != 'PicoW' && matrix.GP2040_BOARDCONFIG != 'Pico2' && matrix.GP2040_BOARDCONFIG != 'SparkFunProMicroRP2350' && matrix.GP2040_BOARDCONFIG != 'FlatboxRev8' }}
|
||||
run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
|
||||
- name: PicoW Build Configure CMake
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
|
||||
- name: Pico2 Build Configure CMake
|
||||
shell: bash
|
||||
if: ${{ matrix.GP2040_BOARDCONFIG == 'Pico2' || matrix.GP2040_BOARDCONFIG == 'SparkFunProMicroRP2350' }}
|
||||
if: ${{ matrix.GP2040_BOARDCONFIG == 'Pico2' || matrix.GP2040_BOARDCONFIG == 'SparkFunProMicroRP2350' || matrix.GP2040_BOARDCONFIG == 'FlatboxRev8' }}
|
||||
run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPICO_BOARD=pico2 -DPICO_PLATFORM=rp2350-arm-s
|
||||
|
||||
- name: Pico Build
|
||||
|
||||
67
configs/FlatboxRev8/BoardConfig.h
Normal file
67
configs/FlatboxRev8/BoardConfig.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: MIT
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 OpenStickCommunity (gp2040-ce.info)
|
||||
*/
|
||||
|
||||
#ifndef FLATBOX_REV8_CONFIG_H_
|
||||
#define FLATBOX_REV8_CONFIG_H_
|
||||
|
||||
#include "enums.pb.h"
|
||||
#include "class/hid/hid.h"
|
||||
|
||||
#define BOARD_CONFIG_LABEL "Flatbox Rev. 8"
|
||||
|
||||
// Main pin mapping Configuration
|
||||
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
|
||||
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
|
||||
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
|
||||
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
|
||||
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
|
||||
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
|
||||
#define GPIO_PIN_24 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
|
||||
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
|
||||
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
|
||||
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
|
||||
#define GPIO_PIN_25 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
|
||||
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
|
||||
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
|
||||
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
|
||||
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
|
||||
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
|
||||
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
|
||||
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
|
||||
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
|
||||
|
||||
#define GPIO_PIN_20 GpioAction::ASSIGNED_TO_ADDON
|
||||
#define GPIO_PIN_21 GpioAction::ASSIGNED_TO_ADDON
|
||||
|
||||
// Keyboard Mapping Configuration
|
||||
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
|
||||
#define KEY_DPAD_UP HID_KEY_ARROW_UP // UP | UP | UP | UP | UP | UP |
|
||||
#define KEY_DPAD_DOWN HID_KEY_ARROW_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
|
||||
#define KEY_DPAD_RIGHT HID_KEY_ARROW_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
|
||||
#define KEY_DPAD_LEFT HID_KEY_ARROW_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
|
||||
#define KEY_BUTTON_B1 HID_KEY_SHIFT_LEFT // B1 | A | B | Cross | 2 | K1 |
|
||||
#define KEY_BUTTON_B2 HID_KEY_Z // B2 | B | A | Circle | 3 | K2 |
|
||||
#define KEY_BUTTON_R2 HID_KEY_X // R2 | RT | ZR | R2 | 8 | K3 |
|
||||
#define KEY_BUTTON_L2 HID_KEY_V // L2 | LT | ZL | L2 | 7 | K4 |
|
||||
#define KEY_BUTTON_B3 HID_KEY_CONTROL_LEFT // B3 | X | Y | Square | 1 | P1 |
|
||||
#define KEY_BUTTON_B4 HID_KEY_ALT_LEFT // B4 | Y | X | Triangle | 4 | P2 |
|
||||
#define KEY_BUTTON_R1 HID_KEY_SPACE // R1 | RB | R | R1 | 6 | P3 |
|
||||
#define KEY_BUTTON_L1 HID_KEY_C // L1 | LB | L | L1 | 5 | P4 |
|
||||
#define KEY_BUTTON_S1 HID_KEY_5 // S1 | Back | Minus | Select | 9 | Coin |
|
||||
#define KEY_BUTTON_S2 HID_KEY_1 // S2 | Start | Plus | Start | 10 | Start |
|
||||
#define KEY_BUTTON_L3 HID_KEY_EQUAL // L3 | LS | LS | L3 | 11 | LS |
|
||||
#define KEY_BUTTON_R3 HID_KEY_MINUS // R3 | RS | RS | R3 | 12 | RS |
|
||||
#define KEY_BUTTON_A1 HID_KEY_9 // A1 | Guide | Home | PS | 13 | ~ |
|
||||
#define KEY_BUTTON_A2 HID_KEY_F2 // A2 | ~ | Capture | ~ | 14 | ~ |
|
||||
#define KEY_BUTTON_FN -1 // Hotkey Function |
|
||||
|
||||
#define USB_PERIPHERAL_ENABLED 1
|
||||
#define USB_PERIPHERAL_PIN_DPLUS 20
|
||||
|
||||
#define DEFAULT_INPUT_MODE_R1 INPUT_MODE_XBONE
|
||||
#define DEFAULT_INPUT_MODE_B4 INPUT_MODE_PS5
|
||||
#define DEFAULT_PS5AUTHENTICATION_TYPE INPUT_MODE_AUTH_TYPE_USB
|
||||
|
||||
#endif
|
||||
28
configs/FlatboxRev8/README.md
Normal file
28
configs/FlatboxRev8/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# GP2040 Configuration for Flatbox rev8
|
||||
|
||||

|
||||
|
||||
Configuration for the [Flatbox rev8](https://github.com/jfedor2/flatbox/tree/master/hardware-rev8) controller, a variant of the [Flatbox](https://github.com/jfedor2/flatbox) design by [jfedor2](https://github.com/jfedor2). This revision uses the RP2350 chip.
|
||||
|
||||
## Main Pin Mapping Configuration
|
||||
|
||||
| RP2040 Pin | Action | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
|
||||
|------------|-------------------------------|--------|--------|--------|----------|--------|--------|
|
||||
| GPIO_PIN_16| GpioAction::BUTTON_PRESS_UP | UP | UP | UP | UP | UP | UP |
|
||||
| GPIO_PIN_10| GpioAction::BUTTON_PRESS_DOWN | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
|
||||
| GPIO_PIN_11| GpioAction::BUTTON_PRESS_RIGHT| RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
|
||||
| GPIO_PIN_09| GpioAction::BUTTON_PRESS_LEFT | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
|
||||
| GPIO_PIN_19| GpioAction::BUTTON_PRESS_B1 | B1 | A | B | Cross | 2 | K1 |
|
||||
| GPIO_PIN_24| GpioAction::BUTTON_PRESS_B2 | B2 | B | A | Circle | 3 | K2 |
|
||||
| GPIO_PIN_26| GpioAction::BUTTON_PRESS_R2 | R2 | RT | ZR | R2 | 8 | K3 |
|
||||
| GPIO_PIN_28| GpioAction::BUTTON_PRESS_L2 | L2 | LT | ZL | L2 | 7 | K4 |
|
||||
| GPIO_PIN_18| GpioAction::BUTTON_PRESS_B3 | B3 | X | Y | Square | 1 | P1 |
|
||||
| GPIO_PIN_25| GpioAction::BUTTON_PRESS_B4 | B4 | Y | X | Triangle | 4 | P2 |
|
||||
| GPIO_PIN_27| GpioAction::BUTTON_PRESS_R1 | R1 | RB | R | R1 | 6 | P3 |
|
||||
| GPIO_PIN_29| GpioAction::BUTTON_PRESS_L1 | L1 | LB | L | L1 | 5 | P4 |
|
||||
| GPIO_PIN_05| GpioAction::BUTTON_PRESS_S1 | S1 | Back | Minus | Select | 9 | Coin |
|
||||
| GPIO_PIN_06| GpioAction::BUTTON_PRESS_S2 | S2 | Start | Plus | Start | 10 | Start |
|
||||
| GPIO_PIN_02| GpioAction::BUTTON_PRESS_L3 | L3 | LS | LS | L3 | 11 | LS |
|
||||
| GPIO_PIN_01| GpioAction::BUTTON_PRESS_R3 | R3 | RS | RS | R3 | 12 | RS |
|
||||
| GPIO_PIN_04| GpioAction::BUTTON_PRESS_A1 | A1 | Guide | Home | PS | 13 | ~ |
|
||||
| GPIO_PIN_03| GpioAction::BUTTON_PRESS_A2 | A2 | ~ | Capture| ~ | 14 | ~ |
|
||||
BIN
configs/FlatboxRev8/assets/Flatbox-rev8.jpg
Normal file
BIN
configs/FlatboxRev8/assets/Flatbox-rev8.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Reference in New Issue
Block a user