diff --git a/targets/TARGET_STM/TARGET_STM32F4/common_objects.h b/targets/TARGET_STM/TARGET_STM32F4/common_objects.h index 9ef9c7ceb4..6d6f77e092 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/common_objects.h +++ b/targets/TARGET_STM/TARGET_STM32F4/common_objects.h @@ -87,6 +87,7 @@ struct i2c_s { /* The 1st 2 members I2CName i2c * and I2C_HandleTypeDef handle should * be kept as the first members of this struct + * to have get_i2c_obj() function work as expected */ I2CName i2c; I2C_HandleTypeDef handle;