Commit a0f79f20 authored by Jean Nanchen's avatar Jean Nanchen Committed by github-actions[bot]
Browse files

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: default avatarJean Nanchen <jean.nanchen@gmail.com>
(cherry picked from commit bc097a6f)
parent 9cd8d8f4
Loading
Loading
Loading
Loading
+2 −0
Changes for drivers/i2c/i2c_ll_stm32_v2.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1194,6 +1194,8 @@ int stm32_i2c_transaction(const struct device *dev,

#ifndef CONFIG_I2C_STM32_INTERRUPT
	struct i2c_stm32_data *data = dev->data;
	const struct i2c_stm32_config *cfg = dev->config;
	I2C_TypeDef *i2c = cfg->i2c;

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