feat(i2c): correct get txfifio len function

This commit is contained in:
gaoxu
2025-03-10 11:45:31 +08:00
committed by Gao Xu
parent ec632f7fed
commit 28c531b45b
10 changed files with 10 additions and 10 deletions

View File

@@ -561,7 +561,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->sr.txfifo_cnt;
*length = (hw->sr.txfifo_cnt >= SOC_I2C_FIFO_LEN) ? 0 : (SOC_I2C_FIFO_LEN - hw->sr.txfifo_cnt);
}
/**