Skip to content

Commit 1702681

Browse files
committed
fix(i2c): correct check condition
Fixes #3043. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent be0df90 commit 1702681

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • libraries/Wire/src/utility

‎libraries/Wire/src/utility/twi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c)
15201520
{
15211521
i2c_t *obj = get_i2c_obj(hi2c);
15221522

1523-
if (obj->isMaster) {
1523+
if (!obj->isMaster) {
15241524
#if defined(USE_HALV2_DRIVER)
15251525
HAL_I2C_SLAVE_EnableListen_IT(hi2c);
15261526
#else

0 commit comments

Comments
 (0)