![]() |
RAFW Flexible Software Package Documentation
Release v2.0.1
|
|
Functions | |
| fsp_err_t | RM_LITTLEFS_SPI_FLASH_W_Open (rm_littlefs_ctrl_t *const p_ctrl, rm_littlefs_cfg_t const *const p_cfg) |
| fsp_err_t | RM_LITTLEFS_SPI_FLASH_W_Close (rm_littlefs_ctrl_t *const p_ctrl) |
| int | rm_littlefs_spi_flash_w_read (const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size) |
| int | rm_littlefs_spi_flash_w_write (const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size) |
| int | rm_littlefs_spi_flash_w_erase (const struct lfs_config *c, lfs_block_t block) |
| int | rm_littlefs_spi_flash_w_lock (const struct lfs_config *c) |
| int | rm_littlefs_spi_flash_w_unlock (const struct lfs_config *c) |
| int | rm_littlefs_spi_flash_w_sync (const struct lfs_config *c) |
| fsp_err_t RM_LITTLEFS_SPI_FLASH_W_Open | ( | rm_littlefs_ctrl_t *const | p_ctrl, |
| rm_littlefs_cfg_t const *const | p_cfg | ||
| ) |
Opens the driver and initializes lower layer SPI driver.
Implements rm_littlefs_api_t::open().
| FSP_SUCCESS | Success. |
| FSP_ERR_ASSERTION | An input parameter was invalid. |
| FSP_ERR_ALREADY_OPEN | Module is already open. |
| FSP_ERR_INVALID_SIZE | The provided block size is invalid. |
| FSP_ERR_INVALID_ARGUMENT | Invalid configuration parameter. |
| FSP_ERR_INTERNAL | Failed to create the semaphore. |
| fsp_err_t RM_LITTLEFS_SPI_FLASH_W_Close | ( | rm_littlefs_ctrl_t *const | p_ctrl | ) |
Closes the driver and the lower level SPI driver.
Implements rm_littlefs_api_t::close().
| FSP_SUCCESS | The driver was closed successfully. |
| FSP_ERR_ASSERTION | An input parameter was invalid. |
| FSP_ERR_NOT_OPEN | Module is not open. |
| int rm_littlefs_spi_flash_w_read | ( | const struct lfs_config * | c, |
| lfs_block_t | block, | ||
| lfs_off_t | off, | ||
| void * | buffer, | ||
| lfs_size_t | size | ||
| ) |
Read data from SPI flash for LittleFS.
| [in] | c | Pointer to LittleFS configuration. |
| [in] | block | Block to read from. |
| [in] | off | Offset within block. |
| [out] | buffer | Buffer to store read data. |
| [in] | size | Size of data to read. |
| 0 | Success. |
| Non-zero | Error occurred. |
| int rm_littlefs_spi_flash_w_write | ( | const struct lfs_config * | c, |
| lfs_block_t | block, | ||
| lfs_off_t | off, | ||
| const void * | buffer, | ||
| lfs_size_t | size | ||
| ) |
Write data to SPI flash for LittleFS.
| [in] | c | Pointer to LittleFS configuration. |
| [in] | block | Block to write to. |
| [in] | off | Offset within block. |
| [in] | buffer | Buffer containing data to write. |
| [in] | size | Size of data to write. |
| 0 | Success. |
| Non-zero | Error occurred. |
| int rm_littlefs_spi_flash_w_erase | ( | const struct lfs_config * | c, |
| lfs_block_t | block | ||
| ) |
Erase block from SPI flash for LittleFS.
| [in] | c | Pointer to LittleFS configuration. |
| [in] | block | Block to erase. |
| 0 | Success. |
| Non-zero | Error occurred. |
| int rm_littlefs_spi_flash_w_lock | ( | const struct lfs_config * | c | ) |
Lock access to SPI flash.
| [in] | c | Pointer to LittleFS configuration. |
| 0 | Success. |
| int rm_littlefs_spi_flash_w_unlock | ( | const struct lfs_config * | c | ) |
Unlock access to SPI flash.
| [in] | c | Pointer to LittleFS configuration. |
| 0 | Success. |
| int rm_littlefs_spi_flash_w_sync | ( | const struct lfs_config * | c | ) |
Sync SPI flash operations.
| [in] | c | Pointer to LittleFS configuration. |
| 0 | Success. |