diff --git a/src/devices/stm32/bus/i2c.cpp b/src/devices/stm32/bus/i2c.cpp index 6478f8a..29ba02d 100644 --- a/src/devices/stm32/bus/i2c.cpp +++ b/src/devices/stm32/bus/i2c.cpp @@ -117,7 +117,8 @@ namespace sta } STM32I2CDevice::STM32I2CDevice(STM32I2C * intf, int address, bool master, bool blocking) - : I2CDevice(intf, address, master, blocking) + /* The address is bit-shifted by one to work properly for the STM32 HAL. */ + : I2CDevice(intf, address << 1, master, blocking) { }