adafruit / adafruit/Adafruit_CircuitPython_AirLift
Allow sharing CS pin with other pins; give up pins for wifi
- Dominant language
- Python
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the adafruit_airlift API code that creates and retains DigitalInOut instances, then trace reset handling and the _bleio.Adapter and adafruit_esp32spi pin handoffs. Done means reset pins can be shared with UART or CS pins, pins are released when no longer needed, and the adafruit_esp32spi path works without conflicting pin ownership.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100