ESP-IDF libraries/drivers in Arduino IDE

EdwardSeymour
Posts: 1
Joined: Wed Aug 11, 2021 5:28 pm

ESP-IDF libraries/drivers in Arduino IDE

Postby EdwardSeymour » Wed Aug 11, 2021 5:42 pm

Hello!
I am trying to use the spi_slave library in my Arduino code to set up my esp32 as an spi slave (obviously :lol: ). The problem is that I get an error when the only thing I have in my code is the #include statement.

My include statement: #include "C:\Users\user\Desktop\esp-idf\components\driver\include\driver\spi_slave.h"

The error: ...spi_slave.h:115:142: error: 'spi_dma_chan_t' has not been declared
esp_err_t spi_slave_initialize(spi_host_device_t host, const spi_bus_config_t *bus_config, const spi_slave_interface_config_t *slave_config, spi_dma_chan_t dma_chan);
^

I have a feeling that this just isn't going to work, but I would greatly appreciate any ideas on how to fix this. I have gone into the spi_slave.h file, but this issue doesn't seem like something that I can fix? Perhaps I just need to include another file along with the spi_slave.h file?

Also, first time poster, so I'm sorry if formatting is wrong or if I left out relevant info. If I did, please let me know

lbernstone
Posts: 827
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP-IDF libraries/drivers in Arduino IDE

Postby lbernstone » Thu Aug 12, 2021 2:13 am

Use the version of the driver that is included in arduino-esp32.
#include <driver/spi_slave.h>

Who is online

Users browsing this forum: No registered users and 98 guests