From efac0ee6a9ba62b3d390ab1cf4b54510425e4ca9 Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 2 Apr 2017 00:25:18 +0100 Subject: [PATCH] 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. --- src/main/target/NAZE/initialisation.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/target/NAZE/initialisation.c b/src/main/target/NAZE/initialisation.c index 9b121e4b12..0d75c2c698 100644 --- a/src/main/target/NAZE/initialisation.c +++ b/src/main/target/NAZE/initialisation.c @@ -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); } -} \ No newline at end of file +}