Functions | |
cy_en_sd_host_status_t | Cy_SD_Host_InitCard (SDHC_Type *base, cy_stc_sd_host_sd_card_config_t *config, cy_stc_sd_host_context_t *context) |
Initializes a card if it is connected. More... | |
cy_en_sd_host_status_t | Cy_SD_Host_Read (SDHC_Type *base, cy_stc_sd_host_write_read_config_t *config, cy_stc_sd_host_context_t const *context) |
Reads single- or multiple-block data from the SD card / eMMC. More... | |
cy_en_sd_host_status_t | Cy_SD_Host_Write (SDHC_Type *base, cy_stc_sd_host_write_read_config_t *config, cy_stc_sd_host_context_t const *context) |
Writes single- or multiple-block data to the SD card / eMMC. More... | |
cy_en_sd_host_status_t | Cy_SD_Host_Erase (SDHC_Type *base, uint32_t startAddr, uint32_t endAddr, cy_en_sd_host_erase_type_t eraseType, cy_stc_sd_host_context_t const *context) |
Erases the number block data of the SD card / eMMC. More... | |
cy_en_sd_host_status_t Cy_SD_Host_InitCard | ( | SDHC_Type * | base, |
cy_stc_sd_host_sd_card_config_t * | config, | ||
cy_stc_sd_host_context_t * | context | ||
) |
Initializes a card if it is connected.
After this function is called, the card is in the transfer state.
*base | The SD host registers structure pointer. |
*config | The pointer to the SD card configuration structure. |
context | The pointer to the context structure cy_stc_sd_host_context_t allocated by the user. The structure is used during the SD host operation for internal configuration and data retention. The user must not modify anything in this structure. If only the SD host functions which do not require context will be used, pass NULL as the pointer to the context. |
cy_en_sd_host_status_t Cy_SD_Host_Read | ( | SDHC_Type * | base, |
cy_stc_sd_host_write_read_config_t * | config, | ||
cy_stc_sd_host_context_t const * | context | ||
) |
Reads single- or multiple-block data from the SD card / eMMC.
If DMA is not used this function blocks until all data is read. If DMA is used all data is read when the Transfer complete event is set. It is the user responsibility to check and reset the transfer complete event (using Cy_SD_Host_GetNormalInterruptStatus and Cy_SD_Host_ClearNormalInterruptStatus functions).
*base | The SD host registers structure pointer. |
*config | The pointer to the SD card read-write structure. |
context | The pointer to the context structure cy_stc_sd_host_context_t allocated by the user. The structure is used during the SD host operation for internal configuration and data retention. The user must not modify anything in this structure. If only the SD host functions which do not require context will be used, pass NULL as the pointer to the context. |
cy_en_sd_host_status_t Cy_SD_Host_Write | ( | SDHC_Type * | base, |
cy_stc_sd_host_write_read_config_t * | config, | ||
cy_stc_sd_host_context_t const * | context | ||
) |
Writes single- or multiple-block data to the SD card / eMMC.
If DMA is not used this function blocks until all data is written. If DMA is used all data is written when the Transfer complete event is set. It is the user responsibility to check and reset the transfer complete event (using Cy_SD_Host_GetNormalInterruptStatus and Cy_SD_Host_ClearNormalInterruptStatus functions).
*base | The SD host registers structure pointer. |
*config | The pointer to the SD card read-write structure. |
context | The pointer to the context structure cy_stc_sd_host_context_t allocated by the user. The structure is used during the SD host operation for internal configuration and data retention. The user must not modify anything in this structure. If only the SD host functions which do not require context will be used, pass NULL as the pointer to the context. |
cy_en_sd_host_status_t Cy_SD_Host_Erase | ( | SDHC_Type * | base, |
uint32_t | startAddr, | ||
uint32_t | endAddr, | ||
cy_en_sd_host_erase_type_t | eraseType, | ||
cy_stc_sd_host_context_t const * | context | ||
) |
Erases the number block data of the SD card / eMMC.
*base | The SD host registers structure pointer. |
startAddr | The address to start erasing from. |
endAddr | The address to stop erasing. |
eraseType | Specifies the erase type (FULE, DISCARD). |
context | The pointer to the context structure cy_stc_sd_host_context_t allocated by the user. The structure is used during the SD host operation for internal configuration and data retention. The user must not modify anything in this structure. If only the SD host functions which do not require context will be used, pass NULL as the pointer to the context. |