RTEMS  5.0.0
Functions

Functions

ALT_STATUS_CODE alt_i2c_rx_dma_threshold_get (ALT_I2C_DEV_t *i2c_dev, uint8_t *threshold)
 
ALT_STATUS_CODE alt_i2c_rx_dma_threshold_set (ALT_I2C_DEV_t *i2c_dev, uint8_t threshold)
 
ALT_STATUS_CODE alt_i2c_tx_dma_threshold_get (ALT_I2C_DEV_t *i2c_dev, uint8_t *threshold)
 
ALT_STATUS_CODE alt_i2c_tx_dma_threshold_set (ALT_I2C_DEV_t *i2c_dev, uint8_t threshold)
 

Detailed Description

The DMA interface has a configurable threshold value that controls the level of entries that triggers the burst handshaking request used for DMA integration.

For the TX threshold, if the number of entries in the TX FIFO is at or below the set threshold, a DMA handshaking request will be made. The valid range for the TX threshold is 0 - (ALT_I2C_TX_FIFO_NUM_ENTRIES - 1).

For the RX threshold, if the number of entries in the RX FIFO is above the set threshold, a DMA handshaking request will be made. The valid range for the RX treshold is 0 - (ALT_I2C_TX_FIFO_NUM_ENTRIES - 1).

Having a higher threshold can improve the AXI bus utilization at the expense of the likelyhoold of overflow / underflow conditions.

Function Documentation

◆ alt_i2c_rx_dma_threshold_get()

ALT_STATUS_CODE alt_i2c_rx_dma_threshold_get ( ALT_I2C_DEV_t i2c_dev,
uint8_t *  threshold 
)

Gets the current RX DMA threshold level value.

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

◆ alt_i2c_rx_dma_threshold_set()

ALT_STATUS_CODE alt_i2c_rx_dma_threshold_set ( ALT_I2C_DEV_t i2c_dev,
uint8_t  threshold 
)

Sets the current RX DMA 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

◆ alt_i2c_tx_dma_threshold_get()

ALT_STATUS_CODE alt_i2c_tx_dma_threshold_get ( ALT_I2C_DEV_t i2c_dev,
uint8_t *  threshold 
)

Gets the current TX DMA threshold level value.

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

◆ alt_i2c_tx_dma_threshold_set()

ALT_STATUS_CODE alt_i2c_tx_dma_threshold_set ( ALT_I2C_DEV_t i2c_dev,
uint8_t  threshold 
)

Sets the current TX DMA 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