mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_i2c_crash' into 'master'
I2C: Fix I2C Master operation with repeated start condition Closes IDFGH-6719 and IDFGH-6724 See merge request espressif/esp-idf!17035
This commit is contained in:
commit
0cfa7ca20f
@ -1335,7 +1335,9 @@ static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num)
|
||||
p_i2c->cmd_idx = 0;
|
||||
if (i2c_cmd_is_single_byte(cmd) || cmd->total_bytes == cmd->bytes_used) {
|
||||
p_i2c->cmd_link.head = p_i2c->cmd_link.head->next;
|
||||
p_i2c->cmd_link.head->cmd.bytes_used = 0;
|
||||
if(p_i2c->cmd_link.head) {
|
||||
p_i2c->cmd_link.head->cmd.bytes_used = 0;
|
||||
}
|
||||
}
|
||||
p_i2c->status = I2C_STATUS_WRITE;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user