How to register a RMT RX callback within ESP32 Arduino?
Posted: Thu Aug 18, 2022 1:30 pm
Hello,
I'm using the ESP32 Arduino framework and was able to setup usage of the RMT module just fine.
What I'm trying to do now is to register a RX callback to get notified when the module disables itself because of the idle_threshold being reached.
Here is the code that I used:
But sadly, this does not compile, it complains about rmt_rx_event_callbacks_t and rmt_rx_register_event_callbacks not being defined.
Considering that the Arduino SDK is built on top of ESP IDF, I tried to declare those items as they are found in that SDK header files, but alas while it does compile, it won't link because the rmt_rx_register_event_callbacks function is not found in the object files.
Is there a way for me to register such a callback? Or is there another way to be notified of the fact that the idle_threshold has been reached?
I'm using the ESP32 Arduino framework and was able to setup usage of the RMT module just fine.
What I'm trying to do now is to register a RX callback to get notified when the module disables itself because of the idle_threshold being reached.
Here is the code that I used:
Code: Select all
rmt_config_t rmt_rx;
rmt_rx.channel = 1;
rmt_rx_event_callbacks_t cbs = {
.on_recv_done = rmt_rx_done_callback
};
rmt_rx_register_event_callbacks(rmt_rx.channel, &cbs, nullptr);
Considering that the Arduino SDK is built on top of ESP IDF, I tried to declare those items as they are found in that SDK header files, but alas while it does compile, it won't link because the rmt_rx_register_event_callbacks function is not found in the object files.
Is there a way for me to register such a callback? Or is there another way to be notified of the fact that the idle_threshold has been reached?