diff --git a/src/driver/mcu/at32/motor_dshot.c b/src/driver/mcu/at32/motor_dshot.c index b6c613043..9f6e159d8 100644 --- a/src/driver/mcu/at32/motor_dshot.c +++ b/src/driver/mcu/at32/motor_dshot.c @@ -114,7 +114,7 @@ void dshot_dma_isr(dma_device_t dev) { if (profile.motor.dshot_telemetry && dshot_phase == dshot_gpio_port_count) { // output phase done, lets swap to input for (uint32_t i = 0; i < MOTOR_PIN_MAX; i++) { - dshot_gpio_init_input(i); + dshot_gpio_init_input(target.motor_pins[i]); } for (uint32_t j = 0; j < dshot_gpio_port_count; j++) { dshot_dma_setup_input(j); diff --git a/src/driver/mcu/stm32/motor_dshot.c b/src/driver/mcu/stm32/motor_dshot.c index a77860dca..90d8b4469 100644 --- a/src/driver/mcu/stm32/motor_dshot.c +++ b/src/driver/mcu/stm32/motor_dshot.c @@ -129,7 +129,7 @@ void dshot_dma_isr(dma_device_t dev) { if (profile.motor.dshot_telemetry && dshot_phase == dshot_gpio_port_count) { // output phase done, lets swap to input for (uint32_t i = 0; i < MOTOR_PIN_MAX; i++) { - dshot_gpio_init_input(i); + dshot_gpio_init_input(target.motor_pins[i]); } for (uint32_t j = 0; j < dshot_gpio_port_count; j++) { dshot_dma_setup_input(j); diff --git a/src/driver/motor_dshot.c b/src/driver/motor_dshot.c index c30b2b5b8..81a72a74c 100644 --- a/src/driver/motor_dshot.c +++ b/src/driver/motor_dshot.c @@ -128,7 +128,7 @@ void dshot_dma_start() { for (uint32_t i = 0; i < MOTOR_PIN_MAX; i++) { const uint32_t port = dshot_pins[i].dshot_port; state.dshot_rpm[i] = dshot_decode_eRPM_telemetry_value(dshot_decode_gcr((uint16_t *)dshot_input_buffer[port], dshot_pins[i].pin_mask)); - dshot_gpio_init_output(i); + dshot_gpio_init_output(target.motor_pins[i]); } }