diff --git a/Tools/AP_Periph/AP_Periph.cpp b/Tools/AP_Periph/AP_Periph.cpp index b9c86c1a64..be0d8c32d4 100644 --- a/Tools/AP_Periph/AP_Periph.cpp +++ b/Tools/AP_Periph/AP_Periph.cpp @@ -208,7 +208,7 @@ void AP_Periph_FW::init() #endif #ifdef HAL_PERIPH_ENABLE_AIRSPEED -#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS +#if (CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS) && (HAL_USE_I2C == TRUE) const bool pins_enabled = ChibiOS::I2CBus::check_select_pins(0x01); if (pins_enabled) { ChibiOS::I2CBus::set_bus_to_floating(0);