FeralAI / GP2040

Gamepad firmware for Raspberry Pi Pico and other RP2040 microcontrollers supporting Nintendo Switch, XInput and DirectInput
https://gp2040.info
MIT License
577 stars 125 forks source link

Board Selection for Configurator #70

Open jbarket opened 2 years ago

jbarket commented 2 years ago

The web configurator is driven by Boards.json, and the activate board is set in .env. The problem is that there's no simple way to have that board set by changing the board configuration files in the main firmware. We could do something at build time to change the .env values, but that seems unnecessary.

Instead, I think we should set that information in the BoardConfig.h file. In the configurator, we should pull that value and use it to determine which board in Boards.json to use.

Then we can reimplement the pin restrictors for the Pico, add a full RP2040 profile for most custom boards that just use every pin, and allow the creation of custom boards for anything that doesn't fit those two.