diff --git a/src/main/drivers/serial_softserial.c b/src/main/drivers/serial_softserial.c index 51dad59614..446302b551 100644 --- a/src/main/drivers/serial_softserial.c +++ b/src/main/drivers/serial_softserial.c @@ -110,7 +110,13 @@ static void softSerialGPIOConfig(GPIO_TypeDef *gpio, uint16_t pin, GPIO_Mode mod void serialInputPortConfig(const timerHardware_t *timerHardwarePtr) { - softSerialGPIOConfig(timerHardwarePtr->gpio, timerHardwarePtr->pin, timerHardwarePtr->gpioInputMode); +#ifdef STM32F10X + softSerialGPIOConfig(timerHardwarePtr->gpio, timerHardwarePtr->pin, Mode_IPU); +#else +#ifdef STM32F303xC + softSerialGPIOConfig(timerHardwarePtr->gpio, timerHardwarePtr->pin, Mode_AF_PP_PU); +#endif +#endif } static bool isTimerPeriodTooLarge(uint32_t timerPeriod)