![]() |
Altera HWLIB
16.0
The Altera HW Manager API Reference Manual
|
Macros | |
#define | ALT_SDMMC_FIFO_NUM_ENTRIES 1024 |
Typedefs | |
typedef enum ALT_SDMMC_MULT_TRANS_e | ALT_SDMMC_MULT_TRANS_t |
ENUMS | |
enum | ALT_SDMMC_MULT_TRANS_e { ALT_SDMMC_MULT_TRANS_TXMSIZE1 = 0x0, ALT_SDMMC_MULT_TRANS_TXMSIZE4 = 0x1, ALT_SDMMC_MULT_TRANS_TXMSIZEK8 = 0x2, ALT_SDMMC_MULT_TRANS_TXMSIZEK16 = 0x3, ALT_SDMMC_MULT_TRANS_RXMSIZEK1 = 0x5, ALT_SDMMC_MULT_TRANS_RXMSIZEK4 = 0x6, ALT_SDMMC_MULT_TRANS_RXMSIZE8 = 0x7 } |
Functions | |
ALT_STATUS_CODE | alt_sdmmc_fifo_reset (void) |
ALT_STATUS_CODE | alt_sdmmc_fifo_param_get (uint32_t *rx_wtrmk, uint32_t *tx_wtrmk, ALT_SDMMC_MULT_TRANS_t *mult_trans_size) |
ALT_STATUS_CODE | alt_sdmmc_fifo_param_set (uint32_t rx_wtrmk, uint32_t tx_wtrmk, ALT_SDMMC_MULT_TRANS_t mult_trans_size) |
bool | alt_sdmmc_fifo_is_rx_wtrmk_reached (void) |
bool | alt_sdmmc_fifo_is_tx_wtrmk_reached (void) |
bool | alt_sdmmc_fifo_is_empty (void) |
bool | alt_sdmmc_fifo_is_full (void) |
int32_t | alt_sdmmc_fifo_count (void) |
ALT_STATUS_CODE | alt_sdmmc_fifo_read (void *dest, const size_t size) |
ALT_STATUS_CODE | alt_sdmmc_fifo_write (const void *src, const size_t size) |
#define ALT_SDMMC_FIFO_NUM_ENTRIES 1024 |
The number of entries (depth) of the SDMMC controller FIFO.
typedef enum ALT_SDMMC_MULT_TRANS_e ALT_SDMMC_MULT_TRANS_t |
This type enumerates the burst size of multiple transaction available to the SD/MMC internal DMA controller.
This type enumerates the burst size of multiple transaction available to the SD/MMC internal DMA controller.
ALT_STATUS_CODE alt_sdmmc_fifo_reset | ( | void | ) |
Resets the SD/MMC controller FIFO.
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_STATUS_CODE alt_sdmmc_fifo_param_get | ( | uint32_t * | rx_wtrmk, |
uint32_t * | tx_wtrmk, | ||
ALT_SDMMC_MULT_TRANS_t * | mult_trans_size | ||
) |
Gets the configured FIFO operational parameter values.
This function returns the FIFO configuration parameter set for the receive and transmit watermark threshold values and the DMA multiple transaction size.
rx_wtrmk | [out] FIFO threshold watermark value when receiving data to card. |
tx_wtrmk | [out] FIFO threshold watermark value when transmitting data to card. |
mult_trans_size | [out] Burst size of multiple transaction. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_STATUS_CODE alt_sdmmc_fifo_param_set | ( | uint32_t | rx_wtrmk, |
uint32_t | tx_wtrmk, | ||
ALT_SDMMC_MULT_TRANS_t | mult_trans_size | ||
) |
Sets the configured FIFO operational parameter values.
This function sets the FIFO configuration parameter for the receive and transmit watermark threshold values and the DMA multiple transaction size.
rx_wtrmk | FIFO threshold watermark value when receiving data to card. |
tx_wtrmk | FIFO threshold watermark value when transmitting data to card. |
mult_trans_size | Burst size of multiple transaction. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
bool alt_sdmmc_fifo_is_rx_wtrmk_reached | ( | void | ) |
Returns true if SD/MMC controller FIFO has reached the receive watermark level otherwise returns false.
true | The FIFO has reached the receive watermark level. |
false | The FIFO has not reached the receive watermark level. |
bool alt_sdmmc_fifo_is_tx_wtrmk_reached | ( | void | ) |
Returns true if SD/MMC controller FIFO has reached the transmit watermark level otherwise returns false.
true | The FIFO has reached the transmit watermark level. |
false | The FIFO has not reached the transmit watermark level. |
bool alt_sdmmc_fifo_is_empty | ( | void | ) |
Returns true if SD/MMC controller FIFO is empty otherwise returns false.
true | The FIFO is empty. |
false | The FIFO is not empty. |
bool alt_sdmmc_fifo_is_full | ( | void | ) |
Returns true if SD/MMC controller FIFO is full otherwise returns false.
true | The FIFO is full. |
false | The FIFO is not full. |
int32_t alt_sdmmc_fifo_count | ( | void | ) |
Returns the number of filled FIFO locations.
ALT_STATUS_CODE alt_sdmmc_fifo_read | ( | void * | dest, |
const size_t | size | ||
) |
Read data from the SD/MMC controller FIFO.
Reads the requested number of bytes (rounded up to nearest whole 32-bit word) from the FIFO. The function returns when the requested number of bytes has been read from the FIFO or if an error occurs.
dest | A pointer to a user supplied destination buffer for the data read from the FIFO. The buffer must be as large the requested number of bytes rounded up to the nearest 32-bit word size. |
size | The requested number of bytes to read from the FIFO. |
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
ALT_STATUS_CODE alt_sdmmc_fifo_write | ( | const void * | src, |
const size_t | size | ||
) |
Writes data to the SD/MMC controller FIFO.
Writes the requested number of bytes (rounded up to nearest whole 32-bit word) to the FIFO. The function returns when the requested number of bytes has been written to the FIFO or if an error occurs.
src | A pointer to A pointer to the source buffer containing the data to be written to the FIFO. The buffer must be as large the requested number of bytes rounded up to the nearest 32-bit word size. |
size | The number of bytes to write to the FIFO. If size is not a multiple of 4 then the number of bytes is rounded up to the next 32-but word size and the byte difference padded with zeroes. |
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |