diff --git a/source/Core/BSP/Sequre/preRTOS.cpp b/source/Core/BSP/Sequre/preRTOS.cpp index 411d53b2..8e61367e 100644 --- a/source/Core/BSP/Sequre/preRTOS.cpp +++ b/source/Core/BSP/Sequre/preRTOS.cpp @@ -21,13 +21,14 @@ void preRToSInit() { HAL_Init(); Setup_HAL(); // Setup all the HAL objects BSPInit(); +#ifdef I2C_SOFT_BUS_1 + I2CBB1::init(); +#endif /* I2C_SOFT_BUS_1 */ #ifdef I2C_SOFT_BUS_2 I2CBB2::init(); -#if defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2 - // Detect FS2711 I2C bus num - if (FS2711::detect_i2c_bus_num() == 1) { - I2CBB1::init(); - } -#endif /* defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2 */ #endif /* I2C_SOFT_BUS_2 */ -} +#if defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2 + // Detect and set FS2711 I2C bus num + FS2711::detect_i2c_bus_num(); +#endif /* defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2 */ +} \ No newline at end of file