Skip to content

Commit

Permalink
fix(i2c): Fix i2c not release semaphore in command send loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mythbuster5 authored and espressif-bot committed Jul 4, 2024
1 parent a44f817 commit 4ce9b78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/driver/i2c/i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ static void s_i2c_send_commands(i2c_master_bus_handle_t i2c_master, TickType_t t
i2c_master->cmd_idx = 0;
i2c_master->trans_idx = 0;
atomic_store(&i2c_master->status, I2C_STATUS_TIMEOUT);
ESP_LOGE(TAG, "I2C software timeout");
xSemaphoreGive(i2c_master->cmd_semphr);
return;
}

Expand Down

0 comments on commit 4ce9b78

Please sign in to comment.