![]() |
RTEMS 6.3
|
Macros | |
| #define | ALT_I2C_TX_FIFO_NUM_ENTRIES 64 |
Functions | |
| ALT_STATUS_CODE | alt_i2c_tx_fifo_is_empty (ALT_I2C_DEV_t *i2c_dev) |
| ALT_STATUS_CODE | alt_i2c_tx_fifo_is_full (ALT_I2C_DEV_t *i2c_dev) |
| ALT_STATUS_CODE | alt_i2c_tx_fifo_level_get (ALT_I2C_DEV_t *i2c_dev, uint32_t *num_entries) |
| ALT_STATUS_CODE | alt_i2c_tx_fifo_threshold_get (ALT_I2C_DEV_t *i2c_dev, uint8_t *threshold) |
| ALT_STATUS_CODE | alt_i2c_tx_fifo_threshold_set (ALT_I2C_DEV_t *i2c_dev, const uint8_t threshold) |
The transmit FIFO has a configurable threshold value that controls the level of entries (or below) that sets the TX_EMPTY status condition and triggers an interrupt. The valid range is 0 - (ALT_I2C_TX_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 0 entries, and a value of (ALT_I2C_TX_FIFO_NUM_ENTRIES-1) sets the threshold for (ALT_I2C_TX_FIFO_NUM_ENTRIES-1) entries.
| #define ALT_I2C_TX_FIFO_NUM_ENTRIES 64 |
The number of entries (depth) of the I2C controller transmit FIFO.
| ALT_STATUS_CODE alt_i2c_tx_fifo_is_empty | ( | ALT_I2C_DEV_t * | i2c_dev | ) |
Returns ALT_E_TRUE when the transmit FIFO is empty.
| i2c_dev | A pointer to the I2C controller device block instance. |
| ALT_E_SUCCESS | Successful status. |
| ALT_E_ERROR | Details about error status code |
| ALT_STATUS_CODE alt_i2c_tx_fifo_is_full | ( | ALT_I2C_DEV_t * | i2c_dev | ) |
Returns ALT_E_TRUE when the transmit FIFO is completely full.
| i2c_dev | A pointer to the I2C controller device block instance. |
| ALT_E_SUCCESS | Successful status. |
| ALT_E_ERROR | Details about error status code |
| ALT_STATUS_CODE alt_i2c_tx_fifo_level_get | ( | ALT_I2C_DEV_t * | i2c_dev, |
| uint32_t * | num_entries ) |
Returns the number of valid entries in the transmit FIFO.
| i2c_dev | A pointer to the I2C controller device block instance. |
| num_entries | [out] The number of entries in the transmit FIFO. |
| ALT_E_SUCCESS | Successful status. |
| ALT_E_ERROR | Details about error status code |
| ALT_STATUS_CODE alt_i2c_tx_fifo_threshold_get | ( | ALT_I2C_DEV_t * | i2c_dev, |
| uint8_t * | threshold ) |
Gets the current transmit FIFO threshold level value.
| i2c_dev | A pointer to the I2C controller device block instance. |
| threshold | [out] The current threshold value. |
| ALT_E_SUCCESS | Successful status. |
| ALT_E_ERROR | Details about error status code |
| ALT_STATUS_CODE alt_i2c_tx_fifo_threshold_set | ( | ALT_I2C_DEV_t * | i2c_dev, |
| const uint8_t | threshold ) |
Sets the current transmit FIFO threshold level value.
| i2c_dev | A pointer to the I2C controller device block instance. |
| threshold | The threshold value. |
| ALT_E_SUCCESS | Successful status. |
| ALT_E_ERROR | Details about error status code |