9 #ifndef __ITS_FLASH_H__
10 #define __ITS_FLASH_H__
15 #include "flash_layout.h"
24 #define ITS_BLOCK_INVALID_ID 0xFFFFFFFFU
27 #if (ITS_FLASH_PROGRAM_UNIT <= 16)
28 #define ITS_FLASH_ALIGNMENT ITS_FLASH_PROGRAM_UNIT
30 #define ITS_FLASH_ALIGNMENT 1
33 #if (PS_FLASH_PROGRAM_UNIT <= 16)
34 #define PS_FLASH_ALIGNMENT PS_FLASH_PROGRAM_UNIT
36 #define PS_FLASH_ALIGNMENT 1
43 #define ITS_FLASH_MAX_ALIGNMENT ITS_UTILS_MAX(ITS_FLASH_ALIGNMENT, \
102 uint8_t *buff,
size_t offset,
size_t size);
122 uint32_t block_id,
const uint8_t *buff,
size_t offset,
const struct its_flash_info_t * its_flash_get_info(enum its_flash_id_t id)
Gets the flash info structure for the provided flash device.
psa_status_t(* erase)(const struct its_flash_info_t *info, uint32_t block_id)
Erases block ID data.
psa_status_t its_flash_block_to_block_move(const struct its_flash_info_t *info, uint32_t dst_block, size_t dst_offset, uint32_t src_block, size_t src_offset, size_t size)
Moves data from source block ID to destination block ID.
Standard error codes for the SPM and RoT Services.
its_flash_id_t
Enumerates the available flash devices.
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.
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() (inclu...
struct flash_fs_info_t fs_info
flash filesystem configuration structure
Structure containing the required information about a flash device to be used by the ITS Flash FS...
psa_status_t(* init)(const struct its_flash_info_t *info)
Initialize the Flash Interface.
int32_t psa_status_t
Function return status.
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.