Skip to content

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

Open
@dhalbert

Description

@dhalbert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions