"RGBLED" PWMs 3 pins as a single RGB LED and exposes methods to set the colour via HSV/RGB.
"Button" handles tracking the state and changed state of a single GPIO button, in addition to supporting auto-repeat for held-down buttons.
The switch to common I2C and common definitions for SPI had broken an edge case in Pico Explorer where no backlight pin is used.
The backlight pin was inadvertently set to the front Breakout Garden SPI slot default, which is pin 20- this also happens to be the I2C SDA pin for Pico Explorer, breaking I2C comms.
This fix adds a new special case board "PICO_EXPLORER_ONBOARD" so that ST7789 can be initialised without the backlight pin.
This will be useful for anyone using ST7789 without the rest of the Pico Explorer library, although it feels a little contrived.
Also switches ST7735 over to the common defines.
This change is specifically intended to avoid a pitfall in MicroPython and will likely have no effect in C++.
When using the REPL in MicroPython it's possible to set up an I2C instance on two pins - ie: 20, 21 - and then subsequently realise these are the wrong pins for your board.
Before this change, these pins would be left hanging even if you created a new I2C instance with new pins - ie: 4, 5 - this would lead to communications failures where they really shouldn't happen. Confusing!
Removes all driver-specific SDA/SCL pin definitions and defaults.
Pin type is "uint" everywhere, but "PIN_UNUSED" is *int*_max for MicroPython compat. That's still a lot of pins!
Adds baudrate to the I2C class, and allows a driver (like Trackball) to check the baudrate is supported
This change adds a common I2C class, gathering various I2C functions into a single point of responsibility.
It's necessary for correctly managing the I2C bus pins and state across multiple devices.
* Add a common/pimoroni.hpp to list default pins for various add-ons
* Move the BG SPI Slot enum here for safe keeping
* Switch all GPIO pin references to "uint" to match Pico SDK and bring back PIN_UNUSED as UINT_MAX