|
MAX3267X LittleFS demo
|
Flash read/write/erase functions declaration. More...
Go to the source code of this file.
Macros | |
| #define | LOGF(...) |
Functions | |
| int | flash_read (const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size) |
| Reads flash memory. More... | |
| int | flash_write (const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size) |
| Writes flash memory. More... | |
| int | flash_erase (const struct lfs_config *c, lfs_block_t block) |
| Erases flash memory block. More... | |
| int | flash_sync (const struct lfs_config *c) |
| Performs pending flash operations. More... | |
| int | flash_verify (uint32_t address, uint32_t length, uint8_t *data) |
| Verifies data in flash. More... | |
| int | check_mem (uint32_t startaddr, uint32_t length, uint32_t data) |
| Compares data in flash with value specified. More... | |
| int | check_erased (uint32_t startaddr, uint32_t length) |
| Checks whether flash memory is erased. More... | |
| int | flash_write4 (uint32_t startaddr, uint32_t length, uint32_t *data, bool verify) |
| Writes 32bit data words to flash. More... | |
Flash read/write/erase functions declaration.
| #define LOGF | ( | ... | ) |
| int check_erased | ( | uint32_t | startaddr, |
| uint32_t | length | ||
| ) |
Checks whether flash memory is erased.
| startaddr | Flash memory address |
| length | Memory block size |
| int check_mem | ( | uint32_t | startaddr, |
| uint32_t | length, | ||
| uint32_t | data | ||
| ) |
Compares data in flash with value specified.
| startaddr | Flash memory address |
| length | Data size |
| data | The value to compare to |
| int flash_erase | ( | const struct lfs_config * | c, |
| lfs_block_t | block | ||
| ) |
Erases flash memory block.
| c | LittleFS config |
| block | Flash memory block number |
| int flash_read | ( | const struct lfs_config * | c, |
| lfs_block_t | block, | ||
| lfs_off_t | off, | ||
| void * | buffer, | ||
| lfs_size_t | size | ||
| ) |
Reads flash memory.
| c | LittleFS config |
| block | Flash memory block number |
| off | Data offset in the block |
| buffer | Data buffer |
| size | Data size |
| int flash_sync | ( | const struct lfs_config * | c | ) |
Performs pending flash operations.
| c | LittleFS config |
| int flash_verify | ( | uint32_t | address, |
| uint32_t | length, | ||
| uint8_t * | data | ||
| ) |
Verifies data in flash.
| address | Flash memory address |
| length | Data size |
| data | Data buffer |
| int flash_write | ( | const struct lfs_config * | c, |
| lfs_block_t | block, | ||
| lfs_off_t | off, | ||
| const void * | buffer, | ||
| lfs_size_t | size | ||
| ) |
Writes flash memory.
| c | LittleFS config |
| block | Flash memory block number |
| off | Data offset in the block |
| buffer | Data buffer |
| size | Data size |
| int flash_write4 | ( | uint32_t | startaddr, |
| uint32_t | length, | ||
| uint32_t * | data, | ||
| bool | verify | ||
| ) |
Writes 32bit data words to flash.
| startaddr | Flash memory address |
| length | Data size |
| data | Data buffer |
| verify | Whether to verify written data |