Skip to content

Commit

Permalink
Updates Flatbox Rev.5 Config & Header Documentation (OpenStickCommuni…
Browse files Browse the repository at this point in the history
…ty#1099)

- Adds missing switch label documentation to BoardConfig header for Flatbox Rev 5
- Adds labels and pinouts to Flatbox Rev 5 Readme

Co-authored-by: Luke A <[email protected]>
  • Loading branch information
brettohland and arntsonl authored Sep 17, 2024
1 parent 9e3d7a6 commit 96e97b2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
41 changes: 21 additions & 20 deletions configs/FlatboxRev5/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,26 @@

// Main pin mapping Configuration
// Mapping between Flatbox Rev4 switch number (as silkscreened) and GPIO pin listed under "Flatbox Rev4 SW#"
// // Flatbox Rev5 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_12 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_13 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// // | Flatbox Rev5 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_S2 // | S1 | S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // | S2 | S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_A1 // | S3 | A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_A2 // | S4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L3 // | S5 | L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_R3 // | S6 | R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_LEFT // | S7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_DOWN // | S8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // | S9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // | S10 | B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B4 // | S11 | B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R1 // | S12 | R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L1 // | S13 | L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // | S14 | B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // | S15 | B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R2 // | S16 | R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L2 // | S17 | L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // | S18 | UP | UP | UP | UP | UP | UP |


// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
Expand All @@ -55,4 +56,4 @@
#define KEY_BUTTON_A2 HID_KEY_F2 // A2 | ~ | Capture | ~ | 14 | ~ |
#define KEY_BUTTON_FN -1 // Hotkey Function |

#endif
#endif
41 changes: 21 additions & 20 deletions configs/FlatboxRev5/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ Configuration for the [Flatbox rev5](https://github.com/jfedor2/flatbox/tree/mas

## Main Pin Mapping Configuration

| RP2040 Pin | Action | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
|------------|-------------------------------|--------|--------|--------|----------|--------|--------|
| GPIO_PIN_10| GpioAction::BUTTON_PRESS_UP | UP | UP | UP | UP | UP | UP |
| GPIO_PIN_12| 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_13| GpioAction::BUTTON_PRESS_LEFT | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
| GPIO_PIN_09| GpioAction::BUTTON_PRESS_B1 | B1 | A | B | Cross | 2 | K1 |
| GPIO_PIN_07| GpioAction::BUTTON_PRESS_B2 | B2 | B | A | Circle | 3 | K2 |
| GPIO_PIN_05| GpioAction::BUTTON_PRESS_R2 | R2 | RT | ZR | R2 | 8 | K3 |
| GPIO_PIN_03| GpioAction::BUTTON_PRESS_L2 | L2 | LT | ZL | L2 | 7 | K4 |
| GPIO_PIN_08| GpioAction::BUTTON_PRESS_B3 | B3 | X | Y | Square | 1 | P1 |
| GPIO_PIN_06| GpioAction::BUTTON_PRESS_B4 | B4 | Y | X | Triangle | 4 | P2 |
| GPIO_PIN_04| GpioAction::BUTTON_PRESS_R1 | R1 | RB | R | R1 | 6 | P3 |
| GPIO_PIN_02| GpioAction::BUTTON_PRESS_L1 | L1 | LB | L | L1 | 5 | P4 |
| GPIO_PIN_15| GpioAction::BUTTON_PRESS_S1 | S1 | Back | Minus | Select | 9 | Coin |
| GPIO_PIN_14| GpioAction::BUTTON_PRESS_S2 | S2 | Start | Plus | Start | 10 | Start |
| GPIO_PIN_28| GpioAction::BUTTON_PRESS_L3 | L3 | LS | LS | L3 | 11 | LS |
| GPIO_PIN_29| GpioAction::BUTTON_PRESS_R3 | R3 | RS | RS | R3 | 12 | RS |
| GPIO_PIN_26| GpioAction::BUTTON_PRESS_A1 | A1 | Guide | Home | PS | 13 | ~ |
| GPIO_PIN_27| GpioAction::BUTTON_PRESS_A2 | A2 | ~ | Capture| ~ | 14 | ~ |
| RP2040 Pin | Action | Flatbox Rev5 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
| ----------- | ------------------------------- | ---------------- | ------ | ------ | ------- | -------- | ------ | ------ |
| GPIO_PIN_14 | GpioAction::BUTTON_PRESS_S2 | S1 | S2 | Start | Plus | Start | 10 | Start |
| GPIO_PIN_15 | GpioAction::BUTTON_PRESS_S1 | S2 | S1 | Back | Minus | Select | 9 | Coin |
| GPIO_PIN_26 | GpioAction::BUTTON_PRESS_A1 | S3 | A1 | Guide | Home | PS | 13 | ~ |
| GPIO_PIN_27 | GpioAction::BUTTON_PRESS_A2 | S4 | A2 | ~ | Capture | ~ | 14 | ~ |
| GPIO_PIN_28 | GpioAction::BUTTON_PRESS_L3 | S5 | L3 | LS | LS | L3 | 11 | LS |
| GPIO_PIN_29 | GpioAction::BUTTON_PRESS_R3 | S6 | R3 | RS | RS | R3 | 12 | RS |
| GPIO_PIN_13 | GpioAction::BUTTON_PRESS_LEFT | S7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
| GPIO_PIN_12 | GpioAction::BUTTON_PRESS_DOWN | S8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
| GPIO_PIN_11 | GpioAction::BUTTON_PRESS_RIGHT | S9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
| GPIO_PIN_08 | GpioAction::BUTTON_PRESS_B3 | S10 | B3 | X | Y | Square | 1 | P1 |
| GPIO_PIN_06 | GpioAction::BUTTON_PRESS_B4 | S11 | B4 | Y | X | Triangle | 4 | P2 |
| GPIO_PIN_04 | GpioAction::BUTTON_PRESS_R1 | S12 | R1 | RB | R | R1 | 6 | P3 |
| GPIO_PIN_02 | GpioAction::BUTTON_PRESS_L1 | S13 | L1 | LB | L | L1 | 5 | P4 |
| GPIO_PIN_09 | GpioAction::BUTTON_PRESS_B1 | S14 | B1 | A | B | Cross | 2 | K1 |
| GPIO_PIN_07 | GpioAction::BUTTON_PRESS_B2 | S15 | B2 | B | A | Circle | 3 | K2 |
| GPIO_PIN_05 | GpioAction::BUTTON_PRESS_R2 | S16 | R2 | RT | ZR | R2 | 8 | K3 |
| GPIO_PIN_03 | GpioAction::BUTTON_PRESS_L2 | S17 | L2 | LT | ZL | L2 | 7 | K4 |
| GPIO_PIN_10 | GpioAction::BUTTON_PRESS_UP | S18 | UP | UP | UP | UP | UP | UP |

0 comments on commit 96e97b2

Please sign in to comment.