I’m trying to use two esp32’s….one as a SPI MASTER and the other as an SPI SLAVE. I can’t find any code to help with a simple example. All the Arduino code I find uses things like :
// Enable SPI as slave.
SPCR = (1 << SPE);
which the IDE doesn’t understand (doesn’t recognize SPCR or SPE) for the esp32.
Can anyone point me to a clear example of working SPI MASTER and SLAVE code? Thanks.
I don’t have an example on how to do that.
But, you can take a look at the spi_master.h and spi_slave.h files and see if you can figure out:
You can also take a look at the IDF documentation:
I hope this helps.