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:
parent
4f743a0b40
commit
efac0ee6a9
1 changed files with 5 additions and 4 deletions
|
@ -32,13 +32,14 @@ void targetBusInit(void)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (hardwareRevision != NAZE32_SP) {
|
if (hardwareRevision == NAZE32_SP) {
|
||||||
i2cInit(I2C_DEVICE);
|
|
||||||
serialRemovePort(SERIAL_PORT_SOFTSERIAL2);
|
serialRemovePort(SERIAL_PORT_SOFTSERIAL2);
|
||||||
} else {
|
|
||||||
if (!doesConfigurationUsePort(SERIAL_PORT_USART3)) {
|
if (!doesConfigurationUsePort(SERIAL_PORT_USART3)) {
|
||||||
serialRemovePort(SERIAL_PORT_USART3);
|
serialRemovePort(SERIAL_PORT_USART3);
|
||||||
i2cInit(I2C_DEVICE);
|
i2cInit(I2C_DEVICE);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
i2cInit(I2C_DEVICE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue