The receive FIFO has a configurable threshold value that controls the level of entries (or above) that sets the RX_FULL status condition and triggers an interrupt. The valid range is 0 - (ALT_I2C_RX_FIFO_NUM_ENTRIES-1), with the additional restriction that I2C controller does not allow this value to be set to a value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 1 entry, and a value of (ALT_I2C_RX_FIFO_NUM_ENTRIES-1) sets the threshold for ALT_I2C_RX_FIFO_NUM_ENTRIES entries.
◆ ALT_I2C_RX_FIFO_NUM_ENTRIES
#define ALT_I2C_RX_FIFO_NUM_ENTRIES 64 |
The number of entries (depth) of the I2C controller receive FIFO.
◆ alt_i2c_rx_fifo_is_empty()
Returns ALT_E_TRUE when the receive FIFO is empty.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_rx_fifo_is_full()
Returns ALT_E_TRUE when the receive FIFO is completely full.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_rx_fifo_level_get()
Returns the number of valid entries in the receive FIFO.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
num_entries | [out] The number of entries in the receive FIFO. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_rx_fifo_threshold_get()
Gets the current receive FIFO threshold level value.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
threshold | [out] The current threshold value. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_rx_fifo_threshold_set()
Sets the current receive FIFO threshold level value.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
threshold | The threshold value. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |