fix(i2c_slave): filter out fake request for esp32

Closes https://github.com/espressif/esp-idf/issues/18268
This commit is contained in:
Chen Chen
2026-03-03 15:36:03 +08:00
parent 0e470fc386
commit cb6c86c1a4
4 changed files with 25 additions and 1 deletions
@@ -879,6 +879,18 @@ static inline i2c_slave_read_write_status_t i2c_ll_slave_get_read_write_status(i
return (hw->status_reg.slave_rw == 0) ? I2C_SLAVE_WRITE_BY_MASTER : I2C_SLAVE_READ_BY_MASTER;
}
/**
* @brief Check whether the slave is waiting for ACK
*
* @param hw Beginning address of the peripheral registers
* @return true if this slave is waiting for ACK, false otherwise
*/
__attribute__((always_inline))
static inline bool i2c_ll_slave_wait_ack(i2c_dev_t *hw)
{
return hw->status_reg.scl_main_state_last == 6;
}
//////////////////////////////////////////Deprecated Functions//////////////////////////////////////////////////////////
/////////////////////////////The following functions are only used by the legacy driver/////////////////////////////////
/////////////////////////////They might be removed in the next major release (ESP-IDF 6.0)//////////////////////////////