diff --git a/src/devices/stm32/bus/i2c.cpp b/src/devices/stm32/bus/i2c.cpp index 4c9deba..98e8e08 100644 --- a/src/devices/stm32/bus/i2c.cpp +++ b/src/devices/stm32/bus/i2c.cpp @@ -144,9 +144,11 @@ namespace sta /* The address is bit-shifted by one to work properly for the STM32 HAL. */ : I2CDevice(intf, address << 1, master, blocking) { +#ifdef STA_ASSERT_ENABLED intf->acquire(); STA_ASSERT(intf->hasAddress(address)); intf->release(); +#endif // STA_ASSERT_ENABLED } } // namespace sta