mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
fix(lp_i2c): Fixed a bug where the LP_I2C did not send NACK for 16-byte reads
This commit updates the LP_I2C driver used by the LP CPU wherein the driver did not send out a NACK when we do a read of multiple of the FIFO depth bytes. This was because the LP I2C controller was configured to send an ACK when the Rx FIFO reaches the threshold instead of a NACK. This commit updates the behavior.
This commit is contained in:
@@ -655,6 +655,20 @@ static inline void i2c_ll_master_clr_bus(i2c_dev_t *hw)
|
||||
hw->ctr.conf_upgate = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the ACK level that the I2C master must send when the Rx FIFO count has reached the threshold value.
|
||||
* ack_level: 1 (NACK)
|
||||
* ack_level: 0 (ACK)
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
static inline void i2c_ll_master_rx_full_ack_level(i2c_dev_t *hw, int ack_level)
|
||||
{
|
||||
hw->ctr.rx_full_ack_level = ack_level;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set I2C source clock
|
||||
*
|
||||
|
Reference in New Issue
Block a user