mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/i2c_too_short_panics_master' into 'master'
I2C: Read transactions, without a STOP, won't panic anymore Closes IDFGH-6928 See merge request espressif/esp-idf!17455
This commit is contained in:
commit
36e7adabac
@ -1310,8 +1310,10 @@ static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num)
|
||||
p_i2c->cmd_idx = 0;
|
||||
} else {
|
||||
p_i2c->cmd_link.head = p_i2c->cmd_link.head->next;
|
||||
if (p_i2c->cmd_link.head != NULL) {
|
||||
p_i2c->cmd_link.head->cmd.bytes_used = 0;
|
||||
}
|
||||
}
|
||||
} else if ((p_i2c->status == I2C_STATUS_ACK_ERROR)
|
||||
|| (p_i2c->status == I2C_STATUS_TIMEOUT)) {
|
||||
evt.type = I2C_CMD_EVT_DONE;
|
||||
|
Loading…
Reference in New Issue
Block a user