mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(i2c): Fix i2c not release semaphore in command send loop
This commit is contained in:
parent
e301e4ee34
commit
8e1698aa05
@ -441,6 +441,8 @@ static void s_i2c_send_commands(i2c_master_bus_handle_t i2c_master, TickType_t t
|
|||||||
i2c_master->cmd_idx = 0;
|
i2c_master->cmd_idx = 0;
|
||||||
i2c_master->trans_idx = 0;
|
i2c_master->trans_idx = 0;
|
||||||
atomic_store(&i2c_master->status, I2C_STATUS_TIMEOUT);
|
atomic_store(&i2c_master->status, I2C_STATUS_TIMEOUT);
|
||||||
|
ESP_LOGE(TAG, "I2C software timeout");
|
||||||
|
xSemaphoreGive(i2c_master->cmd_semphr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user