Description
The Arduino Nano RP2040 ties together UART RX and the CS pin, to save microcontroller pins. This works out because if you are using Bluetooth mode, you don't need the CS pin after you reset into Bluetooth mode.
Currently the adafruit_airlift
API assumes the pins are all distinct. It creates DigitalInOut
s and holds on to them. But it could instead create the DigitalInOut's as needed for resetting purposes and deinit()
them when done.
Context managers will work in some cases, but _bleio.Adapter
expects to be passed DigitalInOut's, so their lifetime is longer.
Another intertwined issue is that adafruit_esp32spi
expects to be passed pins. RIght now some pins it would be passed are already grabbed for reset purposes. So this library probably doesn't even work with adafruit_esp32spi
right now.
See https://forums.adafruit.com/viewtopic.php?f=60&t=179704 for background.