Skip to content

Commit 3bdde69

Browse files
committed
esp32idf5.5: fix deprecated warning (#324)
1 parent 324c2e5 commit 3bdde69

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/build_examples_esp_idf_project.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
# version from https://hub.docker.com/r/espressif/idf/tags
1515
- v5.3.2
1616
- v5.4.1
17+
- release-v5.5
1718
- latest
1819

1920
runs-on: ubuntu-latest

src/FastAccelStepper_idf5_esp32_pcnt.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,28 @@ bool FastAccelStepper::attachToPulseCounter(uint8_t unused_pcnt_unit,
109109
.channels[channel_id]
110110
.pulse_sig;
111111
gpio_matrix_in(step_pin, signal, 0);
112+
#if (ESP_IDF_VERSION_MINOR >= 5)
113+
gpio_iomux_input(step_pin, signal);
114+
#else
112115
gpio_iomux_in(step_pin, signal);
116+
#endif
113117
if (dir_pin != PIN_UNDEFINED && (dir_pin & PIN_EXTERNAL_FLAG) == 0) {
114118
pinMode(dir_pin, OUTPUT);
115119
int control = pcnt_periph_signals.groups[0]
116120
.units[unit_id]
117121
.channels[channel_id]
118122
.control_sig;
123+
#if (ESP_IDF_VERSION_MINOR >= 5)
124+
gpio_iomux_output(dir_pin, 0x100, false);
125+
#else
119126
gpio_iomux_out(dir_pin, 0x100, false);
127+
#endif
120128
gpio_matrix_in(dir_pin, control, 0);
129+
#if (ESP_IDF_VERSION_MINOR >= 5)
130+
gpio_iomux_input(dir_pin, control);
131+
#else
121132
gpio_iomux_in(dir_pin, control);
133+
#endif
122134
}
123135

124136
_attached_pulse_unit = punit;

0 commit comments

Comments
 (0)