RTEMS: DMA Interface

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
DMA Interface
Board Support Packages » ARM » Intel Cyclone V » Contributed Code » I2C Controller API

## 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_dev | A pointer to the I2C controller device block instance.
  threshold | [out] The threshold value.

Return values

  ALT_E_SUCCESS | Successful status.
  ALT_E_ERROR | Details 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_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

## ◆ 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_dev | A pointer to the I2C controller device block instance.
  threshold | [out] The threshold value.

Return values

  ALT_E_SUCCESS | Successful status.
  ALT_E_ERROR | Details 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_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