Updated RFControl for compatibility with Arduino-ESP32 v 2.0.4

Needed to set idle_level to LOW even though idle_output was already disabled.  This is likely because 2.0.4 introduced an entirely new API for RMT, though version 2.0.3 IDF functions and structures seem to be accepted as well.
This commit is contained in:
Gregg 2022-07-23 15:16:43 -05:00
parent c891548ffa
commit d903fd7e97
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@
RFControl::RFControl(uint8_t pin, boolean refClock, boolean installDriver){
#ifdef CONFIG_IDF_TARGET_ESP32C3
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
if(nChannels==RMT_CHANNEL_MAX/2){
#else
if(nChannels==RMT_CHANNEL_MAX){
@ -52,6 +52,7 @@ RFControl::RFControl(uint8_t pin, boolean refClock, boolean installDriver){
config->mem_block_num=1;
config->gpio_num=(gpio_num_t)pin;
config->tx_config.idle_output_en=false;
config->tx_config.idle_level=RMT_IDLE_LEVEL_LOW;
config->tx_config.loop_en=false;
rmt_config(config);