1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

CF/BF - Fix Naze32 missing second softserial port.

The NAZE32_SP can only have one port because it the pins are not
available for use as soft serial.
The NAZE32_SP should only configure the I2C pins if USART3 is not used.
This commit is contained in:
Hydra 2017-04-02 00:25:18 +01:00 committed by Dominic Clifton
parent 4f743a0b40
commit efac0ee6a9

View file

@ -32,13 +32,14 @@ void targetBusInit(void)
#endif
#endif
if (hardwareRevision != NAZE32_SP) {
i2cInit(I2C_DEVICE);
if (hardwareRevision == NAZE32_SP) {
serialRemovePort(SERIAL_PORT_SOFTSERIAL2);
} else {
if (!doesConfigurationUsePort(SERIAL_PORT_USART3)) {
serialRemovePort(SERIAL_PORT_USART3);
i2cInit(I2C_DEVICE);
}
} else {
i2cInit(I2C_DEVICE);
}
}
}