Description
@docmollo, @brentru, @tannewt, @ladyada
I'm moving the discussion here for the ESP32SPI side of handling analog and digital reads from ESP32 hardware in the context of CircuitPython ESP32SPI. This issue consolidates #46 (which could be closed since it's subsumed under this one), and the later discussions in #74 (read there for more background on this issue) which were only tangentially related to that issue and will (hopefully) be closed soon (PR submitted).
The present enhancement proposal is to:
- Implement
setDigitalRead()
andsetAnalogRead()
command handlers in the Adafruit fork of the NINA firmware.setPinMode()
already exists.setDigitalWrite()
andsetAnalogWrite()
also already exist. An issue or PR needs to be expanded or opened on the NINA side for this. - Implement
set_digital_read()
andset_analog_read()
in adafruit_esp32spi.py.set_pin_mode()
is already implemented.set_digital_write()
andset_analog_write()
are also already implemented. - Expand the ESP32SPI digitalio.py module for digital reads.
- Create an ESP32SPI analogio.py module for analog writes and reads.
Implementation could be roughly in this order. Complete low-level functionality would become available with items 1 and 2 above. Then, expanding ESP32SPI digitalio
and adding ESP32SPI analogio
would provide higher-level class interfaces analogous to Circuitpython digitalio
and analogio
usage.