From 71170d4cea428fffb05fc2666201d390ff411fc4 Mon Sep 17 00:00:00 2001 From: dario Date: Sat, 4 Nov 2023 15:21:58 +0100 Subject: [PATCH] Bitshifted the address for STM32I2CDevice --- src/devices/stm32/bus/i2c.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { }