Skip to content

Commit 41543a2

Browse files
committed
ESP32: take the BOOSTER_INPUT as temp input pin
1 parent 4f33fc0 commit 41543a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

DCCRMT.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,12 @@ static void IRAM_ATTR mcpwmPulseOn() {
211211
// default is pos edge trigger, handled by mcpwm_sync_invert_gpio_synchro()
212212
// if neg edge needed
213213
mcpwm_sync_configure(MCPWM_UNIT_1, MCPWM_TIMER_0, &sync_conf);
214-
mcpwm_gpio_init(MCPWM_UNIT_1, MCPWM_SYNC_0, 0 /*MAIN DIRA pin as placeholder*/ );
215-
// use internal pin instead of 5 /*DIRA external shield aka DIRC*/.
214+
#ifndef BOOSTER_INPUT
215+
#error We need BOOSTER_INPUT to be defined, some temporary input pin needed
216+
#endif
217+
mcpwm_gpio_init(MCPWM_UNIT_1, MCPWM_SYNC_0, BOOSTER_INPUT); // used as an input placehoder, changed below
218+
219+
// use internal pin instead
216220
// mux name of sync 0 input: PWM1_SYNC0_IN_IDX
217221
// mux name of RMT output: RMT_SIG_OUT0_IDX
218222
// mux empty input mirror: SIG_IN_FUNC227_IDX

0 commit comments

Comments
 (0)