The functions in this group provide general purpose block read and write flash functions.
ALT_STATUS_CODE alt_sdmmc_read |
( |
ALT_SDMMC_CARD_INFO_t * |
card_info, |
|
|
void * |
dest, |
|
|
void * |
src, |
|
|
const size_t |
size |
|
) |
| |
Reads a block of data from the SD/MMC flash card.
Reads a block of size data bytes from the SD/MMC flash src address into the user supplied dest buffer.
- Parameters
-
card_info | A pointer to a ALT_SDMMC_CARD_INFO_t structure that holds identification and device property information for any detected card. |
dest | The address of a caller supplied destination buffer in system memory large enough to contain the requested block of flash data. |
src | The flash memory address to begin reading data from. |
size | The requested number of data bytes to read from the flash device. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_STATUS_CODE alt_sdmmc_write |
( |
ALT_SDMMC_CARD_INFO_t * |
card_info, |
|
|
void * |
dest, |
|
|
void * |
src, |
|
|
const size_t |
size |
|
) |
| |
Write a block of data to the SD/MMC flash card.
Writes a block of size data bytes to the SD/MMC flash dest address from the designated src buffer. The actual number of bytes written to the flash card is size bytes rounded up to the next whole multiple flash card block size. That is: actual_bytes_written = ((size / flash_block_size) + 1) * flash_block_size
- Parameters
-
card_info | A pointer to a ALT_SDMMC_CARD_INFO_t structure that holds identification and device property information for any detected card. |
dest | The destination flash memory address to begin writing data to. |
src | The source address in system memory to begin writing data from. |
size | The requested number of data bytes to write to the flash device. |
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |