I need help understanding some informations reguarding a project I'm refactoring to update the MCU. The code was originally written using the Arduino framework for ESP8266 and is using the SPI Slave library. In the process, I've discovered that the SPISlave library was dependant on the HSPI slave and wrote information directly into the ESP8266's registers.
I knew beforehand that the ESP32-C5 only supported FSPI, but some functions are absent, notably the "setStatus" function. I also noticed that less callbacks are available since status-related functions are missing. Previously, you could hook callbacks when receiving and sending data, and also when updating and sending the SPI status. From what i saw, now you can only hook callbacks before and after a SPI transmission is queued.
So, I have a couple questions:
- Is it possible for the current SPI Slave API to still be interrupt based, like it used to be for the 8266? So that I don't have to poll on the flag to see if I have an incoming transmission?
- Was the status register sent after the data before? If so, could i just queue two transmissions with different callbacks?
- I assume that before, the data was sent as soon as the registers were updated. So I imagine that I would need to trigger the transmission immediately after queuing it.
Here is the source for the ESP32 library.
Thank you again for your help.