RTEMS 6.1-rc1
Macros | Functions

Macros

#define ALT_I2C_RX_FIFO_NUM_ENTRIES   64
 

Functions

ALT_STATUS_CODE alt_i2c_rx_fifo_is_empty (ALT_I2C_DEV_t *i2c_dev)
 
ALT_STATUS_CODE alt_i2c_rx_fifo_is_full (ALT_I2C_DEV_t *i2c_dev)
 
ALT_STATUS_CODE alt_i2c_rx_fifo_level_get (ALT_I2C_DEV_t *i2c_dev, uint32_t *num_entries)
 
ALT_STATUS_CODE alt_i2c_rx_fifo_threshold_get (ALT_I2C_DEV_t *i2c_dev, uint8_t *threshold)
 
ALT_STATUS_CODE alt_i2c_rx_fifo_threshold_set (ALT_I2C_DEV_t *i2c_dev, const uint8_t threshold)
 

Detailed Description

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.

Macro Definition Documentation

◆ 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.

Function Documentation

◆ alt_i2c_rx_fifo_is_empty()

ALT_STATUS_CODE alt_i2c_rx_fifo_is_empty ( ALT_I2C_DEV_t i2c_dev)

Returns ALT_E_TRUE when the receive FIFO is empty.

Parameters
i2c_devA pointer to the I2C controller device block instance.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code

◆ alt_i2c_rx_fifo_is_full()

ALT_STATUS_CODE alt_i2c_rx_fifo_is_full ( ALT_I2C_DEV_t i2c_dev)

Returns ALT_E_TRUE when the receive FIFO is completely full.

Parameters
i2c_devA pointer to the I2C controller device block instance.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code

◆ alt_i2c_rx_fifo_level_get()

ALT_STATUS_CODE alt_i2c_rx_fifo_level_get ( ALT_I2C_DEV_t i2c_dev,
uint32_t *  num_entries 
)

Returns the number of valid entries in the receive FIFO.

Parameters
i2c_devA pointer to the I2C controller device block instance.
num_entries[out] The number of entries in the receive FIFO.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code

◆ alt_i2c_rx_fifo_threshold_get()

ALT_STATUS_CODE alt_i2c_rx_fifo_threshold_get ( ALT_I2C_DEV_t i2c_dev,
uint8_t *  threshold 
)

Gets the current receive FIFO threshold level value.

Parameters
i2c_devA pointer to the I2C controller device block instance.
threshold[out] The current threshold value.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code

◆ alt_i2c_rx_fifo_threshold_set()

ALT_STATUS_CODE alt_i2c_rx_fifo_threshold_set ( ALT_I2C_DEV_t i2c_dev,
const uint8_t  threshold 
)

Sets the current receive FIFO threshold level value.

Parameters
i2c_devA pointer to the I2C controller device block instance.
thresholdThe threshold value.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code