Skip to content

Commit bc097a6

Browse files
73jnkartben
authored andcommitted
drivers: i2c: stm32: fix build error after timeout patch
Follow-up to PR #88631: fix missing variable declarations introduced in the STM32 I2C LL driver after adding timeouts to blocking loops. The missing declarations caused a build failure when interrupts were disabled (CONFIG_I2C_STM32_INTERRUPT=n). Fixes a regression introduced in #88631. Signed-off-by: Jean Nanchen <[email protected]>
1 parent 4f4ad2e commit bc097a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/i2c/i2c_ll_stm32_v2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,8 @@ int i2c_stm32_transaction(const struct device *dev,
12921292

12931293
#ifndef CONFIG_I2C_STM32_INTERRUPT
12941294
struct i2c_stm32_data *data = dev->data;
1295+
const struct i2c_stm32_config *cfg = dev->config;
1296+
I2C_TypeDef *i2c = cfg->i2c;
12951297

12961298
if (ret == -ETIMEDOUT) {
12971299
if (LL_I2C_IsEnabledReloadMode(i2c)) {

0 commit comments

Comments
 (0)