![]() |
Synergy Software Package User's Manual
|
RTOS-integrated Block Media framework for SDMMC driver. More...
Data Structures | |
| struct | sf_block_media_sdmmc_instance_ctrl_t |
Functions | |
| ssp_err_t | SF_Block_Media_SDMMC_Open (sf_block_media_ctrl_t *const p_api_ctrl, sf_block_media_cfg_t const *const p_cfg) |
| Open device for read/write and control. More... | |
| ssp_err_t | SF_Block_Media_SDMMC_Read (sf_block_media_ctrl_t *const p_api_ctrl, uint8_t *const p_dest, uint32_t const start_block, uint32_t const block_count) |
| Read data from SD/MMC. More... | |
| ssp_err_t | SF_Block_Media_SDMMC_Write (sf_block_media_ctrl_t *const p_api_ctrl, uint8_t const *const p_src, uint32_t const start_block, uint32_t const block_count) |
| Write data to SDMMC channel. More... | |
| ssp_err_t | SF_Block_Media_SDMMC_Control (sf_block_media_ctrl_t *const p_api_ctrl, ssp_command_t const command, void *p_data) |
| Send control commands to and receive status of SD/MMC port. More... | |
| ssp_err_t | SF_Block_Media_SDMMC_Close (sf_block_media_ctrl_t *const p_api_ctrl) |
| Close open device port. More... | |
| ssp_err_t | SF_Block_Media_SDMMC_VersionGet (ssp_version_t *const p_version) |
| Get version of Block Media SD/MMC driver. More... | |
RTOS-integrated Block Media framework for SDMMC driver.
| ssp_err_t SF_Block_Media_SDMMC_Close | ( | sf_block_media_ctrl_t *const | p_api_ctrl | ) |
Close open device port.
Close an open SD/MMC device port.
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | p_ctrl or p_sdmmc is NULL. |
| SSP_ERR_NOT_OPEN | The channel is not opened. |
Mark control block as unused so it can be reconfigured.
| ssp_err_t SF_Block_Media_SDMMC_Control | ( | sf_block_media_ctrl_t *const | p_api_ctrl, |
| ssp_command_t const | command, | ||
| void * | p_data | ||
| ) |
Send control commands to and receive status of SD/MMC port.
Send control commands to the SD/MMC port and receive the status of the SD/MMC port.
| SSP_SUCCESS | Command executed successfully. |
| SSP_ERR_ASSERTION | p_ctrl or p_sdmmc or p_data is Null. |
| SSP_ERR_NOT_OPEN | The channel is not opened. |
| ssp_err_t SF_Block_Media_SDMMC_Open | ( | sf_block_media_ctrl_t *const | p_api_ctrl, |
| sf_block_media_cfg_t const *const | p_cfg | ||
| ) |
Open device for read/write and control.
Open an SD or MMC device port for read/write and control. This function initializes the SDMMC driver and hardware the first time it is called out of reset.
| SSP_SUCCESS | Port is available and is now open for read, write, and control access. |
| SSP_ERR_ASSERTION | p_ctrl, p_cfg, p_block_media_cfg or p_sdmmc is NULL. |
| SSP_ERR_INTERNAL | OS service call fails. |
| SSP_ERR_IN_USE | The channel specified has already been opened. No configurations were changed. Call the associated Close function or use associated Control commands to reconfigure the channel. |
Create SDMMC event flag and put it into context
Mark the stream as open by initializing "BMSO" in its ASCII equivalent.
Cleanup before logging the error
| ssp_err_t SF_Block_Media_SDMMC_Read | ( | sf_block_media_ctrl_t *const | p_api_ctrl, |
| uint8_t *const | p_dest, | ||
| uint32_t const | start_block, | ||
| uint32_t const | block_count | ||
| ) |
Read data from SD/MMC.
Read data from an SD or MMC device port.
| SSP_SUCCESS | Data read successfully. |
| SSP_ERR_ASSERTION | p_ctrl, p_sdmmc or p_dest is NULL. |
| SSP_ERR_NOT_OPEN | The channel is not opened. |
| SSP_ERR_INTERNAL | OS service call fails. |
| SSP_ERR_READ_FAILED | Data read failed. |
Wait until read operation is completed. Event is signaled in event flag object.
| ssp_err_t SF_Block_Media_SDMMC_VersionGet | ( | ssp_version_t *const | p_version | ) |
Get version of Block Media SD/MMC driver.
Return the version of the firmware and API.
| SSP_ERR_ASSERTION | p_version is Pointer. |
| SSP_SUCCESS | version read successfully. |
| ssp_err_t SF_Block_Media_SDMMC_Write | ( | sf_block_media_ctrl_t *const | p_api_ctrl, |
| uint8_t const *const | p_src, | ||
| uint32_t const | start_block, | ||
| uint32_t const | block_count | ||
| ) |
Write data to SDMMC channel.
| SSP_SUCCESS | Card write finished successfully. |
| SSP_ERR_ASSERTION | p_ctrl, p_sdmmc or p_src is NULL. |
| SSP_ERR_NOT_OPEN | The channel is not opened. |
| SSP_ERR_INTERNAL | OS service call fails. |
| SSP_ERR_WRITE_FAILED | Data write failed. |
Wait until write operation is completed. Event is signaled in event flag object.