tosc-rs / mnemos

An Operating System for Building Small Computers
https://mnemos.dev
Apache License 2.0
253 stars 18 forks source link

platform(esp32-c3): SPI driver #295

Open hawkw opened 1 year ago

hawkw commented 1 year ago

we need to get SPI working so that we can talk to the D1 in the WiFi Buddy use case.

see https://docs.rs/esp32c3-hal/latest/esp32c3_hal/spi/index.html for the esp32c3-hal crate's SPI support.

for WiFi buddy, we will be operating as a SPI target device, rather than as a SPI controller ("bus master"). i'm not sure OTTOMH if the esp32c3-hal SPI driver supports operating as a SPI target or if we need to write our own thing.

we may also want a driver where the C3 functions as a SPI controller, as well, to enable non-WiFi Buddy use-cases for MnemOS on the C3. but, this is probably lower priority than the SPI target mode.