nRF24 / RF24

OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
https://nrf24.github.io/RF24
GNU General Public License v2.0
2.22k stars 1.02k forks source link

[Question] Can this library work on the ESP32 without Arduino? #630

Closed TarekkMA closed 4 years ago

TarekkMA commented 4 years ago

I have an ESP32 that I will be running with the ESP-IDF with no Arduino, so how can I use this library with the build system of espressif build system?

Avamander commented 4 years ago

The library relies on the Arduino HAL on the ESP platform. So if you want to use it totally without anything Arduino, you'd either have to add support for your current SPI library or you would have to rewrite the Arduino SPI HAL to the extent it's used here.

TarekkMA commented 4 years ago

Okay I will try to add Arduino as a component to my project and see if I can get it to work

TarekkMA commented 4 years ago

@Avamander the esp arduino seems to be only working on older version of the ESP-IDF. So I guess I will have to support the esp SPI library.

Can you point me on how I can do that? Should I implement the functions in the https://github.com/nRF24/RF24/blob/master/utility/Template/spi.h to work properly on the ESP-IDF only? or should I do something else?

Avamander commented 4 years ago

Something like that, yes. You can also check out the utility/ATXMegaD3 folder, it's built a bit more "ground-up".

TarekkMA commented 4 years ago

Thank you