Skip to content

Commit 4e653b2

Browse files
committed
fix: support IDF v6 GPIO register changes
Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com>
1 parent ca471d2 commit 4e653b2

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/m5_unit_component/adapter_gpio_v2.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ rmt_tx_channel_config_t to_rmt_tx_config(const adapter_config_t &cfg, const uint
3030
out.resolution_hz = calculate_rmt_resolution_hz(apb_freq_hz, cfg.tx.tick_ns);
3131
out.trans_queue_depth = 4;
3232
out.flags.with_dma = cfg.tx.with_dma;
33+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
3334
out.flags.io_loop_back = cfg.tx.loop_enabled;
35+
#endif
3436
out.flags.invert_out = cfg.tx.invert_signal;
3537
return out;
3638
}

src/m5_unit_component/pin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <driver/i2c.h>
1515
#include <soc/gpio_struct.h>
1616
#include <soc/gpio_periph.h>
17+
#include <soc/gpio_reg.h>
1718

1819
namespace m5 {
1920
namespace unit {

0 commit comments

Comments
 (0)