mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 14:49:04 +00:00
feat(i2c): correct get txfifio len function
This commit is contained in:
@@ -486,7 +486,7 @@ static inline void i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw, uint32_t *length)
|
||||
__attribute__((always_inline))
|
||||
static inline void i2c_ll_get_txfifo_len(i2c_dev_t *hw, uint32_t *length)
|
||||
{
|
||||
*length = SOC_I2C_FIFO_LEN - hw->status_reg.tx_fifo_cnt;
|
||||
*length = (hw->status_reg.tx_fifo_cnt >= SOC_I2C_FIFO_LEN) ? 0 : (SOC_I2C_FIFO_LEN - hw->status_reg.tx_fifo_cnt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user