NEURoboticsClub / Space-Drone-Embedded

Embedded firmware for the Space Building Drone project.
GNU General Public License v3.0
0 stars 0 forks source link

[Comms] Add a SPI utility to wrap the IDF driver #1

Open jr1221 opened 6 months ago

jr1221 commented 6 months ago

Use https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/spi_slave.html, and example https://github.com/espressif/esp-idf/tree/v5.2.1/examples/peripherals/spi_slave (use the reciever example mostly, do not use handshake line)

Make a spi.c and spi.h files in src and include. Add the GPIO config from altium to spi.h.

Some recommended stuff in spi

Do not use DMA (DMA=0) for our usecase assume max size of 8 bytes.

There should be functions for send, recieve, init, and check transaction queue status.