![]() |
TF-M Reference Manual
1.2.0
TrustedFirmware-M
|
Structure containing the required information about a flash device to be used by the ITS Flash FS. More...
#include <secure_fw/partitions/internal_trusted_storage/flash/its_flash.h>
Data Fields | |
psa_status_t(* | init )(const struct its_flash_info_t *info) |
Initialize the Flash Interface. More... | |
psa_status_t(* | read )(const struct its_flash_info_t *info, uint32_t block_id, uint8_t *buff, size_t offset, size_t size) |
Reads block data from the position specified by block ID and offset. More... | |
psa_status_t(* | write )(const struct its_flash_info_t *info, uint32_t block_id, const uint8_t *buff, size_t offset, size_t size) |
Writes block data to the position specified by block ID and offset. More... | |
psa_status_t(* | flush )(const struct its_flash_info_t *info) |
Flushes modifications to a block to flash. Must be called after a sequence of calls to write() (including via its_flash_block_to_block_move()) for one block ID, before any call to the same functions for a different block ID. More... | |
psa_status_t(* | erase )(const struct its_flash_info_t *info, uint32_t block_id) |
Erases block ID data. More... | |
void * | flash_dev |
struct flash_fs_info_t | fs_info |
uint16_t | sector_size |
uint16_t | block_size |
uint16_t | num_blocks |
uint16_t | program_unit |
uint16_t | max_file_size |
uint16_t | max_num_files |
uint8_t | erase_val |
Structure containing the required information about a flash device to be used by the ITS Flash FS.
Definition at line 73 of file its_flash.h.
uint16_t block_size |
Size of a logical erase unit presented by the flash interface, a multiple of sector_size.
Definition at line 160 of file its_flash.h.
psa_status_t(* erase)(const struct its_flash_info_t *info, uint32_t block_id) |
Erases block ID data.
[in] | info | Flash device information |
[in] | block_id | Block ID |
Definition at line 152 of file its_flash.h.
uint8_t erase_val |
Value of a byte after erase (usually 0xFF)
Definition at line 168 of file its_flash.h.
void* flash_dev |
Pointer to the flash device
Definition at line 155 of file its_flash.h.
psa_status_t(* flush)(const struct its_flash_info_t *info) |
Flushes modifications to a block to flash. Must be called after a sequence of calls to write() (including via its_flash_block_to_block_move()) for one block ID, before any call to the same functions for a different block ID.
[in] | info | Flash device information |
Definition at line 139 of file its_flash.h.
struct flash_fs_info_t fs_info |
Filesystem configuration
Definition at line 156 of file its_flash.h.
psa_status_t(* init)(const struct its_flash_info_t *info) |
Initialize the Flash Interface.
[in] | info | Flash device information |
Definition at line 82 of file its_flash.h.
uint16_t max_file_size |
Maximum file size
Definition at line 166 of file its_flash.h.
uint16_t max_num_files |
Maximum number of files
Definition at line 167 of file its_flash.h.
uint16_t num_blocks |
Number of logical erase blocks
Definition at line 164 of file its_flash.h.
uint16_t program_unit |
Minimum size of a program operation
Definition at line 165 of file its_flash.h.
psa_status_t(* read)(const struct its_flash_info_t *info, uint32_t block_id, uint8_t *buff, size_t offset, size_t size) |
Reads block data from the position specified by block ID and offset.
[in] | info | Flash device information |
[in] | block_id | Block ID |
[out] | buff | Buffer pointer to store the data read |
[in] | offset | Offset position from the init of the block |
[in] | size | Number of bytes to read |
Definition at line 101 of file its_flash.h.
uint16_t sector_size |
Size of the flash device's physical erase unit
Definition at line 157 of file its_flash.h.
psa_status_t(* write)(const struct its_flash_info_t *info, uint32_t block_id, const uint8_t *buff, size_t offset, size_t size) |
Writes block data to the position specified by block ID and offset.
[in] | info | Flash device information |
[in] | block_id | Block ID |
[in] | buff | Buffer pointer to the write data |
[in] | offset | Offset position from the init of the block |
[in] | size | Number of bytes to write |
Definition at line 121 of file its_flash.h.