Skip to content

Allow sharing CS pin with other pins; give up pins for wifi #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dhalbert opened this issue Jun 11, 2021 · 0 comments
Open

Allow sharing CS pin with other pins; give up pins for wifi #3

dhalbert opened this issue Jun 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dhalbert
Copy link
Contributor

dhalbert commented Jun 11, 2021

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 DigitalInOuts 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.

@dhalbert dhalbert changed the title Allow sharing CS pin with other pins Allow sharing CS pin with other pins; give up pins for wifi Jun 11, 2021
@tekktrik tekktrik added the enhancement New feature or request label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants