![]() |
Synergy Software Package User's Manual
|
RTOS-integrated Block Media framework for RAM. More...
Data Structures | |
| struct | sf_block_media_ram_instance_ctrl_t |
Functions | |
| ssp_err_t | SF_BLOCK_MEDIA_RAM_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_RAM_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 RAM buffer. More... | |
| ssp_err_t | SF_BLOCK_MEDIA_RAM_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 RAM buffer. More... | |
| ssp_err_t | SF_BLOCK_MEDIA_RAM_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 RAM buffer. More... | |
| ssp_err_t | SF_BLOCK_MEDIA_RAM_Close (sf_block_media_ctrl_t *const p_api_ctrl) |
| Close the Framework. More... | |
| ssp_err_t | SF_BLOCK_MEDIA_RAM_VersionGet (ssp_version_t *const p_version) |
| Get version of Block Media RAM framework. More... | |
RTOS-integrated Block Media framework for RAM.
| ssp_err_t SF_BLOCK_MEDIA_RAM_Close | ( | sf_block_media_ctrl_t *const | p_api_ctrl | ) |
Close the Framework.
| SSP_SUCCESS | RAM buffer is available and is now open for read, write, and control access. |
| SSP_ERR_ASSERTION | p_api_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Framework is not opened. |
Check if Framework is NOT open
Mark Framework as close
| ssp_err_t SF_BLOCK_MEDIA_RAM_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 RAM buffer.
| SSP_SUCCESS | Command executed successfully. |
| SSP_ERR_ASSERTION | p_api_ctrl or p_data is NULL. |
| SSP_ERR_NOT_OPEN | Framework is not opened. |
| SSP_ERR_UNSUPPORTED | Command not supported. |
Check if Framework is NOT open
| ssp_err_t SF_BLOCK_MEDIA_RAM_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.
| SSP_SUCCESS | RAM buffer is available and is now open for read, write, and control access. |
| SSP_ERR_ASSERTION | p_api_ctrl, p_cfg, p_cfg->p_extend, or p_block_media_cfg->p_ram_buffer is NULL. |
| SSP_ERR_IN_USE | Framework is already open by someone else |
Check if Framework is already in USE
Copy the block size and RAM buffer memory address to control structure for further operation
Mark device as a open
| ssp_err_t SF_BLOCK_MEDIA_RAM_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 RAM buffer.
| SSP_SUCCESS | Data read successfully. |
| SSP_ERR_ASSERTION | p_api_ctrl, p_dest or internal control block element is NULL. |
| SSP_ERR_NOT_OPEN | The Framework is not opened. |
| SSP_ERR_INVALID_BLOCKS | Invalid block passed to API |
Check if Framework is NOT open
Copy the content of p_ram_buffer into destination
| ssp_err_t SF_BLOCK_MEDIA_RAM_VersionGet | ( | ssp_version_t *const | p_version | ) |
Get version of Block Media RAM framework.
Return the version of the firmware and API.
| SSP_ERR_ASSERTION | p_version is NULL. |
| SSP_SUCCESS | version read successfully. |
| ssp_err_t SF_BLOCK_MEDIA_RAM_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 RAM buffer.
| SSP_SUCCESS | Data write successfully. |
| SSP_ERR_ASSERTION | p_api_ctrl, p_src or internal control block element is NULL. |
| SSP_ERR_NOT_OPEN | Framework is not opened. |
| SSP_ERR_INVALID_BLOCKS | Invalid block passed to API |
Check if Framework is NOT open
Copy the content of source into p_ram_buffer