diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6420633..df0458de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,17 +32,5 @@ jobs: pio platform install https://github.com/arntsonl/wizio-pico - name: Run PlatformIO run: | - # pio run -e osfrd - # mv .pio/build/osfrd/APPLICATION.uf2 .pio/build/osfrd/GP2040-OSFRD.uf2 - # pio run -e crush-counter-1.5 - # mv .pio/build/crush-counter-1.5/APPLICATION.uf2 .pio/build/crush-counter-1.5/GP2040-CrushCounter-15.uf2 - # pio run -e crush-counter-2.0 - # mv .pio/build/crush-counter-2.0/APPLICATION.uf2 .pio/build/crush-counter-2.0/GP2040-CrushCounter-20.uf2 pio run -e raspberry-pi-pico - mv .pio/build/raspberry-pi-pico/APPLICATION.uf2 .pio/build/raspberry-pi-pico/GP2040-RaspberryPiPico.uf2 - # pio run -e pico-fighting-board - # mv .pio/build/pico-fighting-board/APPLICATION.uf2 .pio/build/pico-fighting-board/GP2040-PicoFightingBoard.uf2 - # pio run -e dural - # mv .pio/build/dural/APPLICATION.uf2 .pio/build/dural/GP2040-DURAL.uf2 - # pio run -e flatbox-rev-4 - # mv .pio/build/flatbox-rev-4/APPLICATION.uf2 .pio/build/flatbox-rev-4/GP2040-FlatboxRev4.uf2 + mv .pio/build/raspberry-pi-pico/APPLICATION.uf2 .pio/build/raspberry-pi-pico/GP2040-CE-RaspberryPiPico.uf2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 622f1477..3107cfd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,29 +36,11 @@ jobs: pio platform install https://github.com/Wiz-IO/wizio-pico - name: Run PlatformIO run: | - pio run -e osfrd - mv .pio/build/osfrd/APPLICATION.uf2 .pio/build/osfrd/GP2040-OSFRD_${{ steps.tagName.outputs.tag }}.uf2 - pio run -e crush-counter-1.5 - mv .pio/build/crush-counter-1.5/APPLICATION.uf2 .pio/build/crush-counter-1.5/GP2040-CrushCounter-15_${{ steps.tagName.outputs.tag }}.uf2 - pio run -e crush-counter-2.0 - mv .pio/build/crush-counter-2.0/APPLICATION.uf2 .pio/build/crush-counter-2.0/GP2040-CrushCounter-20_${{ steps.tagName.outputs.tag }}.uf2 pio run -e raspberry-pi-pico - mv .pio/build/raspberry-pi-pico/APPLICATION.uf2 .pio/build/raspberry-pi-pico/GP2040-RaspberryPiPico_${{ steps.tagName.outputs.tag }}.uf2 - pio run -e pico-fighting-board - mv .pio/build/pico-fighting-board/APPLICATION.uf2 .pio/build/pico-fighting-board/GP2040-PicoFightingBoard_${{ steps.tagName.outputs.tag }}.uf2 - pio run -e dural - mv .pio/build/dural/APPLICATION.uf2 .pio/build/dural/GP2040-DURAL_${{ steps.tagName.outputs.tag }}.uf2 - pio run -e flatbox-rev-4 - mv .pio/build/flatbox-rev-4/APPLICATION.uf2 .pio/build/flatbox-rev-4/GP2040-FlatboxRev4_${{ steps.tagName.outputs.tag }}.uf2 + mv .pio/build/raspberry-pi-pico/APPLICATION.uf2 .pio/build/raspberry-pi-pico/GP2040-CE-RaspberryPiPico_${{ steps.tagName.outputs.tag }}.uf2 - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | - .pio/build/osfrd/GP2040-OSFRD_${{ steps.tagName.outputs.tag }}.uf2 - .pio/build/crush-counter-1.5/GP2040-CrushCounter-15_${{ steps.tagName.outputs.tag }}.uf2 - .pio/build/crush-counter-2.0/GP2040-CrushCounter-20_${{ steps.tagName.outputs.tag }}.uf2 - .pio/build/raspberry-pi-pico/GP2040-RaspberryPiPico_${{ steps.tagName.outputs.tag }}.uf2 - .pio/build/pico-fighting-board/GP2040-PicoFightingBoard_${{ steps.tagName.outputs.tag }}.uf2 - .pio/build/dural/GP2040-DURAL_${{ steps.tagName.outputs.tag }}.uf2 - .pio/build/flatbox-rev-4/GP2040-FlatboxRev4_${{ steps.tagName.outputs.tag }}.uf2 + .pio/build/raspberry-pi-pico/GP2040-CE-RaspberryPiPico_${{ steps.tagName.outputs.tag }}.uf2 diff --git a/configs/BentoBox/BoardConfig.h b/configs/BentoBox/BoardConfig.h deleted file mode 100644 index f431c137..00000000 --- a/configs/BentoBox/BoardConfig.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#ifndef BENTOBOX_CONFIG_H_ -#define BENTOBOX_CONFIG_H_ - -#include -#include "enums.h" -#include "NeoPico.hpp" -#include "PlayerLEDs.h" - -#define PIN_DPAD_UP 2 -#define PIN_DPAD_DOWN 12 -#define PIN_DPAD_RIGHT 11 -#define PIN_DPAD_LEFT 13 -#define PIN_BUTTON_B1 3 -#define PIN_BUTTON_B2 4 -#define PIN_BUTTON_R2 5 -#define PIN_BUTTON_L2 6 -#define PIN_BUTTON_B3 10 -#define PIN_BUTTON_B4 9 -#define PIN_BUTTON_R1 8 -#define PIN_BUTTON_L1 7 -#define PIN_BUTTON_S1 21 -#define PIN_BUTTON_S2 22 -#define PIN_BUTTON_L3 18 -#define PIN_BUTTON_R3 17 -#define PIN_BUTTON_A1 20 -#define PIN_BUTTON_A2 19 - -#define DEFAULT_SOCD_MODE SOCD_MODE_SECOND_INPUT_PRIORITY -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#define BOARD_LEDS_PIN 15 - -#define LED_BRIGHTNESS_MAXIMUM 255 -#define LED_BRIGHTNESS_STEPS 10 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 2 - -#define LEDS_DPAD_LEFT 0 -#define LEDS_DPAD_DOWN 1 -#define LEDS_DPAD_RIGHT 2 -#define LEDS_DPAD_UP 11 -#define LEDS_BUTTON_B3 3 -#define LEDS_BUTTON_B4 4 -#define LEDS_BUTTON_R1 5 -#define LEDS_BUTTON_L1 6 -#define LEDS_BUTTON_B1 10 -#define LEDS_BUTTON_B2 9 -#define LEDS_BUTTON_R2 8 -#define LEDS_BUTTON_L2 7 - -#define HAS_I2C_DISPLAY 1 -#define I2C_SDA_PIN 26 -#define I2C_SCL_PIN 27 -#define I2C_BLOCK i2c1 -#define I2C_SPEED 800000 - -#endif diff --git a/configs/BentoBox/env.ini b/configs/BentoBox/env.ini deleted file mode 100644 index e18a45b8..00000000 --- a/configs/BentoBox/env.ini +++ /dev/null @@ -1,5 +0,0 @@ -[env:bentobox] -build_flags = - ${env.build_flags} - -I configs/BentoBox/ -upload_port = .pio/build/bentobox/ diff --git a/configs/CrushCounter/1.5/BoardConfig.h b/configs/CrushCounter/1.5/BoardConfig.h deleted file mode 100644 index af8525f5..00000000 --- a/configs/CrushCounter/1.5/BoardConfig.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#pragma once - -#include -#include "enums.h" -#include "NeoPico.hpp" -#include "PlayerLEDs.h" - - -#define PIN_DPAD_UP 20 -#define PIN_DPAD_DOWN 8 -#define PIN_DPAD_LEFT 1 -#define PIN_DPAD_RIGHT 14 -#define PIN_BUTTON_B1 18 -#define PIN_BUTTON_B2 17 -#define PIN_BUTTON_B3 13 -#define PIN_BUTTON_B4 9 -#define PIN_BUTTON_L1 12 -#define PIN_BUTTON_R1 10 -#define PIN_BUTTON_L2 19 -#define PIN_BUTTON_R2 16 -#define PIN_BUTTON_S1 3 -#define PIN_BUTTON_S2 0 -#define PIN_BUTTON_L3 6 -#define PIN_BUTTON_R3 7 -#define PIN_BUTTON_A1 4 -#define PIN_BUTTON_A2 5 -#define PIN_SETTINGS 11 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#define BOARD_LEDS_PIN 2 - -#define LED_BRIGHTNESS_MAXIMUM 100 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 1 - -#define LEDS_DPAD_LEFT 0 -#define LEDS_DPAD_DOWN 1 -#define LEDS_DPAD_RIGHT 2 -#define LEDS_DPAD_UP 3 -#define LEDS_BUTTON_B3 4 -#define LEDS_BUTTON_B4 5 -#define LEDS_BUTTON_R1 6 -#define LEDS_BUTTON_L1 7 -#define LEDS_BUTTON_B1 8 -#define LEDS_BUTTON_B2 9 -#define LEDS_BUTTON_R2 10 -#define LEDS_BUTTON_L2 11 - -#define PLED_TYPE PLED_TYPE_RGB -#define PLED1_PIN 12 -#define PLED2_PIN 13 -#define PLED3_PIN 14 -#define PLED4_PIN 15 diff --git a/configs/CrushCounter/2.0/BoardConfig.h b/configs/CrushCounter/2.0/BoardConfig.h deleted file mode 100644 index 245e701b..00000000 --- a/configs/CrushCounter/2.0/BoardConfig.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#pragma once - -#include -#include "enums.h" -#include "NeoPico.hpp" -#include "PlayerLEDs.h" - -#define PIN_DPAD_UP 16 -#define PIN_DPAD_DOWN 28 -#define PIN_DPAD_LEFT 18 -#define PIN_DPAD_RIGHT 29 -#define PIN_BUTTON_B1 8 // K1 -#define PIN_BUTTON_B2 10 // K2 -#define PIN_BUTTON_B3 7 // P1 -#define PIN_BUTTON_B4 9 // P2 -#define PIN_BUTTON_L1 13 // P4 -#define PIN_BUTTON_R1 11 // P3 -#define PIN_BUTTON_L2 14 // K4 -#define PIN_BUTTON_R2 12 // K3 -#define PIN_BUTTON_S1 20 // Select -#define PIN_BUTTON_S2 19 // Start -#define PIN_BUTTON_L3 23 // L3 -#define PIN_BUTTON_R3 24 // R3 -#define PIN_BUTTON_A1 21 // Home -#define PIN_BUTTON_A2 22 // Capture -#define PIN_SETTINGS 25 -#define BOARD_LEDS_PIN 17 -#define LEDS_DPAD_LEFT 0 -#define LEDS_DPAD_DOWN 1 -#define LEDS_DPAD_RIGHT 2 -#define LEDS_DPAD_UP 3 -#define LEDS_BUTTON_B3 4 -#define LEDS_BUTTON_B4 5 -#define LEDS_BUTTON_R1 6 -#define LEDS_BUTTON_L1 7 -#define LEDS_BUTTON_B1 8 -#define LEDS_BUTTON_B2 9 -#define LEDS_BUTTON_R2 10 -#define LEDS_BUTTON_L2 11 - -#define PLED_TYPE PLED_TYPE_RGB -#define PLED1_PIN 12 -#define PLED2_PIN 13 -#define PLED3_PIN 14 -#define PLED4_PIN 15 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#define HAS_I2C_DISPLAY 1 -#define I2C_SDA_PIN 26 -#define I2C_SCL_PIN 27 -#define I2C_BLOCK i2c1 -#define DISPLAY_I2C_ADDR 0x3C - -#define I2C_SPEED 800000 - -#define LED_BRIGHTNESS_MAXIMUM 100 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 1 - diff --git a/configs/CrushCounter/OSFRD/BoardConfig.h b/configs/CrushCounter/OSFRD/BoardConfig.h deleted file mode 100644 index 9c695e1d..00000000 --- a/configs/CrushCounter/OSFRD/BoardConfig.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#pragma once - -#include -#include "enums.h" -#include "NeoPico.hpp" -#include "PlayerLEDs.h" - -#define PIN_DPAD_UP 13 -#define PIN_DPAD_DOWN 11 -#define PIN_DPAD_LEFT 10 -#define PIN_DPAD_RIGHT 12 -#define PIN_BUTTON_B1 4 -#define PIN_BUTTON_B2 5 -#define PIN_BUTTON_B3 0 -#define PIN_BUTTON_B4 1 -#define PIN_BUTTON_L1 3 -#define PIN_BUTTON_R1 2 -#define PIN_BUTTON_L2 7 -#define PIN_BUTTON_R2 6 -#define PIN_BUTTON_S1 8 -#define PIN_BUTTON_S2 9 -#define PIN_BUTTON_L3 17 -#define PIN_BUTTON_R3 16 -#define PIN_BUTTON_A1 28 -#define PIN_BUTTON_A2 18 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#define BOARD_LEDS_PIN 14 - -#define LED_BRIGHTNESS_MAXIMUM 100 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 1 - -#define LEDS_DPAD_LEFT 0 -#define LEDS_DPAD_DOWN 1 -#define LEDS_DPAD_RIGHT 2 -#define LEDS_DPAD_UP 3 -#define LEDS_BUTTON_B3 4 -#define LEDS_BUTTON_B4 5 -#define LEDS_BUTTON_R1 6 -#define LEDS_BUTTON_L1 7 -#define LEDS_BUTTON_B1 8 -#define LEDS_BUTTON_B2 9 -#define LEDS_BUTTON_R2 10 -#define LEDS_BUTTON_L2 11 - -#define PLED_TYPE PLED_TYPE_RGB -#define PLED1_PIN 12 -#define PLED2_PIN 13 -#define PLED3_PIN 14 -#define PLED4_PIN 15 - diff --git a/configs/CrushCounter/env.ini b/configs/CrushCounter/env.ini deleted file mode 100644 index 12361bd8..00000000 --- a/configs/CrushCounter/env.ini +++ /dev/null @@ -1,25 +0,0 @@ -[env:crush-counter-1.5] -build_flags = - ${env.build_flags} - -I configs/CrushCounter/1.5/ -upload_port = .pio/build/crush-counter-1.5/ - -[env:crush-counter-2.0] -build_flags = - ${env.build_flags} - -D BOARD_CRUSH_COUNTER_20 - -I configs/CrushCounter/2.0/ -upload_port = .pio/build/crush-counter-2.0/ - -[env:osfrd] -build_flags = - ${env.build_flags} - -I configs/CrushCounter/OSFRD/ -upload_port = .pio/build/osfrd/ - -[env:osfrd-pirate] -build_flags = - ${env.build_flags} - -D BOARD_PIMORONI_PICO_LIPO_16MB - -I configs/CrushCounter/OSFRD/ -upload_port = .pio/build/osfrd-pirate/ diff --git a/configs/DURAL/BoardConfig.h b/configs/DURAL/BoardConfig.h deleted file mode 100644 index 22d35fd4..00000000 --- a/configs/DURAL/BoardConfig.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#ifndef DURAL_CONFIG_H_ -#define DURAL_CONFIG_H_ - -#include - -#define PIN_DPAD_UP 9 -#define PIN_DPAD_DOWN 7 -#define PIN_DPAD_LEFT 6 -#define PIN_DPAD_RIGHT 8 -#define PIN_BUTTON_B1 21 -#define PIN_BUTTON_B2 20 -#define PIN_BUTTON_B3 23 -#define PIN_BUTTON_B4 22 -#define PIN_BUTTON_L1 27 -#define PIN_BUTTON_R1 29 -#define PIN_BUTTON_L2 26 -#define PIN_BUTTON_R2 28 -#define PIN_BUTTON_S1 5 -#define PIN_BUTTON_S2 4 -#define PIN_BUTTON_L3 1 -#define PIN_BUTTON_R3 0 -#define PIN_BUTTON_A1 3 -#define PIN_BUTTON_A2 2 -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - -#define DEFAULT_SOCD_MODE SOCD_MODE_UP_PRIORITY -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#endif diff --git a/configs/DURAL/README.md b/configs/DURAL/README.md deleted file mode 100644 index 4df467ef..00000000 --- a/configs/DURAL/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# GP2040 Configuration for DURAL - -![DURAL](assets/DURAL.jpg) - - diff --git a/configs/DURAL/assets/DURAL.jpg b/configs/DURAL/assets/DURAL.jpg deleted file mode 100644 index c97bba31..00000000 Binary files a/configs/DURAL/assets/DURAL.jpg and /dev/null differ diff --git a/configs/DURAL/env.ini b/configs/DURAL/env.ini deleted file mode 100644 index f2c88c75..00000000 --- a/configs/DURAL/env.ini +++ /dev/null @@ -1,6 +0,0 @@ -[env:dural] -build_flags = - ${env.build_flags} - -D BOARD_SPARKFUN_MICRO_RP2040 - -I configs/DURAL/ -upload_port = .pio/build/dural/ diff --git a/configs/DebugBoard/BoardConfig.h b/configs/DebugBoard/BoardConfig.h deleted file mode 100644 index 9220ce88..00000000 --- a/configs/DebugBoard/BoardConfig.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - * - * Debug setup - * ------------------------------------------------------------------------------------ - * 2x Raspberry Pi Pico (2nd is for picoprobe debugging) - * 1x Waveshare 1.3inch LCD Display Module - https://www.waveshare.com/pico-lcd-1.3.htm - * 1x Waveshare RGB 16x10 LED Matrix - https://www.waveshare.com/pico-rgb-led.htm - * 1x Waveshare Quad GPIO Expander - https://www.waveshare.com/pico-quad-expander.htm - * - */ - -#ifndef DEBUG_BOARD_CONFIG_H_ -#define DEBUG_BOARD_CONFIG_H_ - -#include -#include "hardware/i2c.h" -#include "OneBitDisplay/OneBitDisplay.h" -#include "enums.h" -#include "NeoPico.hpp" -#include "PlayerLEDs.h" - -// Remaining pins (0, 1 reserved for I2C): 16 - -#define PIN_DPAD_UP 4 -#define PIN_DPAD_DOWN 5 -#define PIN_DPAD_LEFT 2 -#define PIN_DPAD_RIGHT 3 -#define PIN_BUTTON_B3 10 -#define PIN_BUTTON_B4 12 -#define PIN_BUTTON_R1 14 -#define PIN_BUTTON_L1 15 -#define PIN_BUTTON_B1 22 -#define PIN_BUTTON_B2 21 -#define PIN_BUTTON_R2 19 -#define PIN_BUTTON_L2 17 -#define PIN_BUTTON_S1 28 -#define PIN_BUTTON_S2 27 -#define PIN_BUTTON_L3 6 -#define PIN_BUTTON_R3 8 -#define PIN_BUTTON_A1 26 -#define PIN_BUTTON_A2 9 // Not connected -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_WASD - -#define BOARD_LEDS_PIN 7 - -#define LED_BRIGHTNESS_MAXIMUM 50 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 4 - -#define LEDS_DPAD_LEFT 0 -#define LEDS_DPAD_DOWN 1 -#define LEDS_DPAD_RIGHT 2 -#define LEDS_DPAD_UP 3 -#define LEDS_BUTTON_B3 4 -#define LEDS_BUTTON_B4 5 -#define LEDS_BUTTON_R1 6 -#define LEDS_BUTTON_L1 7 -#define LEDS_BUTTON_B1 8 -#define LEDS_BUTTON_B2 9 -#define LEDS_BUTTON_R2 10 -#define LEDS_BUTTON_L2 11 - -#define PLED_TYPE PLED_TYPE_PWM -#define PLED1_PIN 20 -#define PLED2_PIN 11 -#define PLED3_PIN 18 -#define PLED4_PIN 13 - -#define HAS_I2C_DISPLAY 1 -#define I2C_SDA_PIN 0 -#define I2C_SCL_PIN 1 -#define I2C_BLOCK i2c0 -#define I2C_SPEED 800000 - -#endif diff --git a/configs/DebugBoard/README.md b/configs/DebugBoard/README.md deleted file mode 100644 index 6f8a2a1e..00000000 --- a/configs/DebugBoard/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# GP2040 Configuration for Debugging - -![Debug setup](assets/DebugBoard.jpg) - -Feral's debugging setup. This is what peak performance looks like. - -But seriously, it contains (from left to right): - -- Custom Hat #1: "Fightstick" with 17 total inputs - - 1x [10x10x9mm 5 Way Tact Switch](https://www.amazon.com/Bestol-Direction-Switch-10109mm-Navigation/dp/B07F71N26Z/) - - 12x [3x6x4.3mm Tact Switch](https://www.amazon.com/gp/product/B008DS188Y/) -- Custom Hat #2: Aux function module - - 0.96" 128x32 SSD1306 I2C OLED - - 4x Player LEDs - - 1x DIP switch -- [Pimoroni Pico LiPo](https://shop.pimoroni.com/products/pimoroni-pico-lipo) (USB-C FTW!) -- [Waveshare RGB 16x10 LED Matrix](https://www.waveshare.com/pico-rgb-led.htm) -- Custom Hat #3: I2C expansion board - - 256k EEPROM module - - 2x JST-XH 4-pin connectors - -All connected to a [Waveshare Quad GPIO Expander](https://www.waveshare.com/pico-quad-expander.htm). Custom hats are built on [Pimoroni Pico Proto boards](https://shop.pimoroni.com/products/pico-proto). - -An [Adafruit QT Py RP2040](https://www.adafruit.com/product/4900) is flashed with a [custom Picoprobe build](assets/picoprobe_adafruit_qtpy_rp2040.uf2) and attached to the Pico LiPo's JST-SH connectors for debugging. diff --git a/configs/DebugBoard/assets/DebugBoard.jpg b/configs/DebugBoard/assets/DebugBoard.jpg deleted file mode 100644 index 9bfcdff9..00000000 Binary files a/configs/DebugBoard/assets/DebugBoard.jpg and /dev/null differ diff --git a/configs/DebugBoard/assets/picoprobe_adafruit_qtpy_rp2040.uf2 b/configs/DebugBoard/assets/picoprobe_adafruit_qtpy_rp2040.uf2 deleted file mode 100644 index b16e90ac..00000000 Binary files a/configs/DebugBoard/assets/picoprobe_adafruit_qtpy_rp2040.uf2 and /dev/null differ diff --git a/configs/DebugBoard/env.ini b/configs/DebugBoard/env.ini deleted file mode 100644 index 4698b282..00000000 --- a/configs/DebugBoard/env.ini +++ /dev/null @@ -1,8 +0,0 @@ -[env:debug] -debug_tool = picoprobe -upload_protocol = picoprobe -build_type = debug -build_flags = - ${env.build_flags} - -I configs/DebugBoard/ -upload_port = .pio/build/debug/ diff --git a/configs/Fightboard/BoardConfig.h b/configs/Fightboard/BoardConfig.h deleted file mode 100644 index 4daa8ec8..00000000 --- a/configs/Fightboard/BoardConfig.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - * - * Custom config for a modded Fightboard / Fightboard MX using an ItsyBitsy RP2040. - * - */ - -#ifndef FIGHTBOARD_CONFIG_H_ -#define FIGHTBOARD_CONFIG_H_ - -#include -#include -#include -#include "Pixel.hpp" -#include "enums.h" - -#define PIN_DPAD_UP 10 -#define PIN_DPAD_DOWN 8 -#define PIN_DPAD_LEFT 9 -#define PIN_DPAD_RIGHT 7 -#define PIN_BUTTON_B1 20 -#define PIN_BUTTON_B2 19 -#define PIN_BUTTON_B3 24 -#define PIN_BUTTON_B4 29 -#define PIN_BUTTON_L1 27 -#define PIN_BUTTON_R1 28 -#define PIN_BUTTON_L2 25 -#define PIN_BUTTON_R2 18 -#define PIN_BUTTON_S1 2 -#define PIN_BUTTON_S2 1 -#define PIN_BUTTON_L3 3 -#define PIN_BUTTON_R3 4 -#define PIN_BUTTON_A1 0 -#define PIN_BUTTON_A2 5 -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_WASD - -#define BOARD_LEDS_PIN 14 - -#define LED_BRIGHTNESS_MAXIMUM 255 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRBW -#define LEDS_PER_PIXEL 1 - -#define LEDS_DPAD_LEFT 10 -#define LEDS_DPAD_DOWN 9 -#define LEDS_DPAD_RIGHT 8 -#define LEDS_DPAD_UP 11 -#define LEDS_BUTTON_B3 0 -#define LEDS_BUTTON_B4 1 -#define LEDS_BUTTON_R1 2 -#define LEDS_BUTTON_L1 3 -#define LEDS_BUTTON_B1 7 -#define LEDS_BUTTON_B2 6 -#define LEDS_BUTTON_R2 5 -#define LEDS_BUTTON_L2 4 - -#endif diff --git a/configs/Fightboard/README.md b/configs/Fightboard/README.md deleted file mode 100644 index a7dc79f1..00000000 --- a/configs/Fightboard/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# GP2040 Configuration for Fightboard and Fightboard MX - -The Fightboard and Fightboard MX come with the ItsyBitsy 32u4. If you're brave/skilled enough, you can *upgrade* your Fightboard with an ItsyBitsy RP2040 running GP2040 firmware. This is an example pin mapping for a possible DIY swap. - -![Pin Mapping](assets/PinMapping.png) diff --git a/configs/Fightboard/assets/PinMapping.png b/configs/Fightboard/assets/PinMapping.png deleted file mode 100644 index 8cc82b1d..00000000 Binary files a/configs/Fightboard/assets/PinMapping.png and /dev/null differ diff --git a/configs/Fightboard/assets/PinMapping.xcf b/configs/Fightboard/assets/PinMapping.xcf deleted file mode 100644 index 8adacd94..00000000 Binary files a/configs/Fightboard/assets/PinMapping.xcf and /dev/null differ diff --git a/configs/Fightboard/env.ini b/configs/Fightboard/env.ini deleted file mode 100644 index 9d3627a0..00000000 --- a/configs/Fightboard/env.ini +++ /dev/null @@ -1,5 +0,0 @@ -[env:fightboard] -build_flags = - ${env.build_flags} - -I configs/Fightboard/ -upload_port = .pio/build/fightboard/ diff --git a/configs/FlatboxRev4/BoardConfig.h b/configs/FlatboxRev4/BoardConfig.h deleted file mode 100644 index adc0ca89..00000000 --- a/configs/FlatboxRev4/BoardConfig.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#ifndef FLATBOX_REV4_CONFIG_H_ -#define FLATBOX_REV4_CONFIG_H_ - -#include - -#define PIN_DPAD_UP 16 -#define PIN_DPAD_DOWN 10 -#define PIN_DPAD_LEFT 9 -#define PIN_DPAD_RIGHT 11 -#define PIN_BUTTON_B1 19 -#define PIN_BUTTON_B2 24 -#define PIN_BUTTON_B3 18 -#define PIN_BUTTON_B4 25 -#define PIN_BUTTON_L1 29 -#define PIN_BUTTON_R1 27 -#define PIN_BUTTON_L2 28 -#define PIN_BUTTON_R2 26 -#define PIN_BUTTON_S1 3 -#define PIN_BUTTON_S2 1 -#define PIN_BUTTON_L3 6 -#define PIN_BUTTON_R3 4 -#define PIN_BUTTON_A1 2 -#define PIN_BUTTON_A2 5 -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - -#define DEFAULT_SOCD_MODE SOCD_MODE_UP_PRIORITY -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#endif diff --git a/configs/FlatboxRev4/README.md b/configs/FlatboxRev4/README.md deleted file mode 100644 index c67144cc..00000000 --- a/configs/FlatboxRev4/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# GP2040 Configuration for Flatbox Rev 4 - -![Flatbox](assets/Flatbox-rev2b-finished-product.jpg) - -Configuration for the [Flatbox Rev 4](https://github.com/jfedor2/flatbox/tree/master/hardware-rev4), one of the excellent revisions of the [Flatbox](https://github.com/jfedor2/flatbox) design by [jfedor2](https://github.com/jfedor2) powered by an RP2040 MCU. diff --git a/configs/FlatboxRev4/assets/Flatbox-rev2b-finished-product.jpg b/configs/FlatboxRev4/assets/Flatbox-rev2b-finished-product.jpg deleted file mode 100644 index aaaa8938..00000000 Binary files a/configs/FlatboxRev4/assets/Flatbox-rev2b-finished-product.jpg and /dev/null differ diff --git a/configs/FlatboxRev4/env.ini b/configs/FlatboxRev4/env.ini deleted file mode 100644 index 88dac53f..00000000 --- a/configs/FlatboxRev4/env.ini +++ /dev/null @@ -1,5 +0,0 @@ -[env:flatbox-rev-4] -upload_port = .pio/build/flatbox-rev-4/ -build_flags = - ${env.build_flags} - -I configs/FlatboxRev4/ diff --git a/configs/GeeekPiStick/BoardConfig.h b/configs/GeeekPiStick/BoardConfig.h deleted file mode 100644 index ba1de9ac..00000000 --- a/configs/GeeekPiStick/BoardConfig.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - * - * Preset config for Pico with a GeeekPi Pico Screw Terminal Expansion Board: - * https://www.amazon.com/gp/product/B0998594PL/ - * - */ - -#ifndef GEEEK_PI_STICK_CONFIG_H_ -#define GEEEK_PI_STICK_CONFIG_H_ - -#include - -#define PIN_DPAD_DOWN 4 -#define PIN_DPAD_UP 5 -#define PIN_DPAD_LEFT 6 -#define PIN_DPAD_RIGHT 7 - -#define PIN_BUTTON_B1 8 -#define PIN_BUTTON_B2 9 -#define PIN_BUTTON_R2 10 -#define PIN_BUTTON_L2 11 -#define PIN_BUTTON_B3 12 -#define PIN_BUTTON_B4 13 -#define PIN_BUTTON_R1 14 -#define PIN_BUTTON_L1 15 - -#define PIN_BUTTON_S1 17 -#define PIN_BUTTON_S2 18 -#define PIN_BUTTON_L3 19 -#define PIN_BUTTON_R3 20 -#define PIN_BUTTON_A1 21 -#define PIN_BUTTON_A2 22 - -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_ARCADE - -#endif diff --git a/configs/GeeekPiStick/README.md b/configs/GeeekPiStick/README.md deleted file mode 100644 index daf1b0b2..00000000 --- a/configs/GeeekPiStick/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# GP2040 Configuration for GeeekPi GPIO Breakout - -Preset config for Pico with a GeeekPi Pico Screw Terminal Expansion Board: - -![Pin Mapping](assets/PinMapping.png) - -Notes: - -* GP2040 button labels are blue on white background, no slant. -* Each screw terminal row has a ground (`GND`) connection available. -* If hooking up RGB LEDs, use the `VBUS` terminal on the bottom row for power. diff --git a/configs/GeeekPiStick/assets/PinMapping.png b/configs/GeeekPiStick/assets/PinMapping.png deleted file mode 100644 index f15adda0..00000000 Binary files a/configs/GeeekPiStick/assets/PinMapping.png and /dev/null differ diff --git a/configs/GeeekPiStick/assets/PinMapping.xcf b/configs/GeeekPiStick/assets/PinMapping.xcf deleted file mode 100644 index 327e1cda..00000000 Binary files a/configs/GeeekPiStick/assets/PinMapping.xcf and /dev/null differ diff --git a/configs/GeeekPiStick/env.ini b/configs/GeeekPiStick/env.ini deleted file mode 100644 index 3e79e647..00000000 --- a/configs/GeeekPiStick/env.ini +++ /dev/null @@ -1,5 +0,0 @@ -[env:geeek-pi-stick] -build_flags = - ${env.build_flags} - -I configs/GeeekPiStick/ -upload_port = .pio/build/geeek-pi-stick/ diff --git a/configs/Hydra/BoardConfig.h b/configs/Hydra/BoardConfig.h deleted file mode 100644 index c49d6f5d..00000000 --- a/configs/Hydra/BoardConfig.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * SPDX-FileCopyrightText: Copyright (c) 2021 Jason Skuby (mytechtoybox.com) - */ - -#ifndef HYDRA_CONFIG_H_ -#define HYDRA_CONFIG_H_ - -#include -#include "enums.h" -#include "NeoPico.hpp" -#include "PlayerLEDs.h" - -#define PIN_DPAD_DOWN 0 -#define PIN_DPAD_UP 1 -#define PIN_DPAD_LEFT 2 -#define PIN_DPAD_RIGHT 3 -#define PIN_BUTTON_B3 4 -#define PIN_BUTTON_B4 5 -#define PIN_BUTTON_R1 6 -#define PIN_BUTTON_L1 7 -#define PIN_BUTTON_B1 8 -#define PIN_BUTTON_B2 9 -#define PIN_BUTTON_R2 10 -#define PIN_BUTTON_L2 11 -#define PIN_BUTTON_S2 12 -#define PIN_BUTTON_S1 13 -#define PIN_BUTTON_R3 14 -#define PIN_BUTTON_A1 15 -#define PIN_BUTTON_A2 18 -#define PIN_BUTTON_L3 19 -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - - -#define DEFAULT_SOCD_MODE SOCD_MODE_UP_PRIORITY -#define BUTTON_LAYOUT BUTTON_LAYOUT_HITBOX - -#define BOARD_LEDS_PIN 22 - -#define LED_BRIGHTNESS_MAXIMUM 200 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 2 - -#define LEDS_DPAD_LEFT 11 -#define LEDS_DPAD_DOWN 10 -#define LEDS_DPAD_RIGHT 9 -#define LEDS_DPAD_UP 0 -#define LEDS_BUTTON_B3 8 -#define LEDS_BUTTON_B4 7 -#define LEDS_BUTTON_R1 6 -#define LEDS_BUTTON_L1 5 -#define LEDS_BUTTON_B1 1 -#define LEDS_BUTTON_B2 2 -#define LEDS_BUTTON_R2 3 -#define LEDS_BUTTON_L2 4 - -// #define PLED_TYPE PLED_TYPE_PWM -// #define PLED1_PIN 16 -// #define PLED2_PIN 17 -// #define PLED3_PIN 18 -// #define PLED4_PIN 19 - -#define HAS_I2C_DISPLAY 1 -#define I2C_SDA_PIN 20 -#define I2C_SCL_PIN 21 -#define I2C_BLOCK i2c0 -#define I2C_SPEED 800000 - -#endif diff --git a/configs/Hydra/env.ini b/configs/Hydra/env.ini deleted file mode 100644 index 06a103f1..00000000 --- a/configs/Hydra/env.ini +++ /dev/null @@ -1,14 +0,0 @@ -[env:hydra] -build_flags = - ${env.build_flags} - -I configs/Hydra/ -upload_port = .pio/build/hydra/ - -[env:hydra-debug] -debug_tool = picoprobe -upload_protocol = picoprobe -build_type = debug -build_flags = - ${env.build_flags} - -I configs/Hydra/ -upload_port = .pio/build/hydra-debug/ diff --git a/configs/Pico/BoardConfig.h b/configs/Pico/BoardConfig.h index d51ead80..5ee60526 100644 --- a/configs/Pico/BoardConfig.h +++ b/configs/Pico/BoardConfig.h @@ -26,11 +26,45 @@ #define PIN_BUTTON_R3 19 #define PIN_BUTTON_A1 20 #define PIN_BUTTON_A2 21 -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 +#define PIN_BUTTON_TURBO 14 +#define PIN_SLIDER_LS 26 +#define PIN_SLIDER_RS 27 #define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL #define BUTTON_LAYOUT BUTTON_LAYOUT_ARCADE +#define TURBO_LED_PIN 15 + +#define BOARD_LEDS_PIN 28 + +#define LED_BRIGHTNESS_MAXIMUM 50 +#define LED_BRIGHTNESS_STEPS 5 +#define LED_FORMAT LED_FORMAT_GRB +#define LEDS_PER_PIXEL 1 + +#define LEDS_DPAD_LEFT 0 +#define LEDS_DPAD_DOWN 1 +#define LEDS_DPAD_RIGHT 2 +#define LEDS_DPAD_UP 3 +#define LEDS_BUTTON_B3 4 +#define LEDS_BUTTON_B4 5 +#define LEDS_BUTTON_R1 6 +#define LEDS_BUTTON_L1 7 +#define LEDS_BUTTON_B1 8 +#define LEDS_BUTTON_B2 9 +#define LEDS_BUTTON_R2 10 +#define LEDS_BUTTON_L2 11 + +#define PLED_TYPE PLED_TYPE_NONE +#define PLED1_PIN -1 +#define PLED2_PIN -1 +#define PLED3_PIN -1 +#define PLED4_PIN -1 + +#define HAS_I2C_DISPLAY 1 +#define I2C_SDA_PIN 0 +#define I2C_SCL_PIN 1 +#define I2C_BLOCK i2c0 +#define I2C_SPEED 800000 + #endif diff --git a/configs/Pico/assets/PinMapping.png b/configs/Pico/assets/PinMapping.png index a77ebff2..e3a14711 100644 Binary files a/configs/Pico/assets/PinMapping.png and b/configs/Pico/assets/PinMapping.png differ diff --git a/configs/Pico/assets/PinMapping.xcf b/configs/Pico/assets/PinMapping.xcf index ee7d8d1b..427c9515 100644 Binary files a/configs/Pico/assets/PinMapping.xcf and b/configs/Pico/assets/PinMapping.xcf differ diff --git a/configs/PicoFightingBoard b/configs/PicoFightingBoard deleted file mode 160000 index 3be8d510..00000000 --- a/configs/PicoFightingBoard +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3be8d51064767e18471e64fb781f550e4c4e6ae7 diff --git a/include/helper.h b/include/helper.h index e707a5c8..04b3523e 100644 --- a/include/helper.h +++ b/include/helper.h @@ -11,7 +11,7 @@ #include "xinput_driver.h" // GP2040-CE Version (32 character limit) -#define GP2040VERSION "0.4.4" +#define GP2040VERSION "0.5.0" const std::string BUTTON_LABEL_UP = "Up"; const std::string BUTTON_LABEL_DOWN = "Down"; diff --git a/src/inputs/turbo.cpp b/src/inputs/turbo.cpp index b064b175..1d1643a8 100644 --- a/src/inputs/turbo.cpp +++ b/src/inputs/turbo.cpp @@ -21,6 +21,12 @@ void TurboInput::setup() gpio_set_dir(boardOptions.pinButtonTurbo, GPIO_IN); // Set as INPUT gpio_pull_up(boardOptions.pinButtonTurbo); // Set as PULLUP + if (TURBO_LED_PIN != -1) { + gpio_init(TURBO_LED_PIN); + gpio_set_dir(TURBO_LED_PIN, GPIO_OUT); + gpio_put(TURBO_LED_PIN, 0); + } + bDebState = false; uDebTime = getMillis(); lastPressed = 0; @@ -92,6 +98,16 @@ void TurboInput::process() lastDpad = 0; // disable last dpad } + + // Set TURBO LED if a button is going + if ( TURBO_LED_PIN != -1 ) { + if ((gamepad->state.buttons & buttonsEnabled) && !bTurboFlicker) { + gpio_put(TURBO_LED_PIN, 1); + } else { + gpio_put(TURBO_LED_PIN, 0); + } + } + // disable button during turbo flicker if (bTurboFlicker) { gamepad->state.buttons &= ~(buttonsEnabled); @@ -103,13 +119,4 @@ void TurboInput::process() bTurboFlicker ^= true; // Button ON/OFF State Reverse nextTimer = getMillis() + uIntervalMS; // interval to flicker-off button - - // Set TURBO LED if a button is going - if ( TURBO_LED_PIN != -1 ) { - if ((gamepad->state.buttons & buttonsEnabled) && !bTurboFlicker) { - gpio_put(TURBO_LED_PIN, 1); - } else { - gpio_put(TURBO_LED_PIN, 0); - } - } } \ No newline at end of file diff --git a/src/storagemanager.cpp b/src/storagemanager.cpp index 10f20629..6793036b 100644 --- a/src/storagemanager.cpp +++ b/src/storagemanager.cpp @@ -74,7 +74,6 @@ void Storage::setDefaultBoardOptions() boardOptions.displayFlip = DISPLAY_FLIP; boardOptions.displayInvert = DISPLAY_INVERT; boardOptions.turboShotCount = DEFAULT_SHOT_PER_SEC; - //strcpy(boardOptions.boardVersion, GP2040VERSION); boardOptions.checksum = CHECKSUM_MAGIC; // set checksum to magic number boardOptions.checksum = CRC32::calculate(&boardOptions); EEPROM.set(BOARD_STORAGE_INDEX, boardOptions); diff --git a/www/.env b/www/.env index d37624cd..a37941e5 100644 --- a/www/.env +++ b/www/.env @@ -1,4 +1,4 @@ GENERATE_SOURCEMAP=false -REACT_APP_CURRENT_VERSION=v0.4.3 +REACT_APP_CURRENT_VERSION=v0.5.0 REACT_APP_GP2040_BOARD=pico REACT_APP_GP2040_CONTROLLER=pico