TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
its_flash_info_external.c File Reference
#include "its_flash.h"
#include "Driver_Flash.h"
#include "flash_layout.h"
#include "its_utils.h"
#include "ps_object_defs.h"
#include "its_flash_nor.h"
Include dependency graph for its_flash_info_external.c:

Go to the source code of this file.

Macros

#define FLASH_INFO_INIT   its_flash_nor_init
 
#define FLASH_INFO_READ   its_flash_nor_read
 
#define FLASH_INFO_WRITE   its_flash_nor_write
 
#define FLASH_INFO_FLUSH   its_flash_nor_flush
 
#define FLASH_INFO_ERASE   its_flash_nor_erase
 
#define PS_FLASH_ALIGNMENT   PS_FLASH_PROGRAM_UNIT
 
#define FLASH_INFO_BLOCK_SIZE   (PS_SECTOR_SIZE * PS_SECTORS_PER_BLOCK)
 
#define FLASH_INFO_MAX_FILE_SIZE
 
#define FLASH_INFO_MAX_NUM_FILES   PS_MAX_NUM_OBJECTS
 
#define FLASH_INFO_ERASE_VAL   0xFFU
 
#define FLASH_INFO_DEV   &PS_FLASH_DEV_NAME
 

Variables

ARM_DRIVER_FLASH PS_FLASH_DEV_NAME
 
struct its_flash_info_t its_flash_info_external
 

Macro Definition Documentation

#define FLASH_INFO_BLOCK_SIZE   (PS_SECTOR_SIZE * PS_SECTORS_PER_BLOCK)

Definition at line 77 of file its_flash_info_external.c.

#define FLASH_INFO_DEV   &PS_FLASH_DEV_NAME

Definition at line 96 of file its_flash_info_external.c.

#define FLASH_INFO_ERASE   its_flash_nor_erase

Definition at line 57 of file its_flash_info_external.c.

#define FLASH_INFO_ERASE_VAL   0xFFU

Definition at line 87 of file its_flash_info_external.c.

#define FLASH_INFO_FLUSH   its_flash_nor_flush

Definition at line 56 of file its_flash_info_external.c.

#define FLASH_INFO_INIT   its_flash_nor_init

Definition at line 53 of file its_flash_info_external.c.

#define FLASH_INFO_MAX_FILE_SIZE
Value:
#define PS_MAX_OBJECT_SIZE
#define ITS_UTILS_ALIGN(x, a)
Aligns a value up to the provided alignment.
Definition: its_utils.h:56
#define PS_FLASH_ALIGNMENT

Definition at line 80 of file its_flash_info_external.c.

#define FLASH_INFO_MAX_NUM_FILES   PS_MAX_NUM_OBJECTS

Definition at line 84 of file its_flash_info_external.c.

#define FLASH_INFO_READ   its_flash_nor_read

Definition at line 54 of file its_flash_info_external.c.

#define FLASH_INFO_WRITE   its_flash_nor_write

Definition at line 55 of file its_flash_info_external.c.

#define PS_FLASH_ALIGNMENT   PS_FLASH_PROGRAM_UNIT

Definition at line 60 of file its_flash_info_external.c.

Variable Documentation

struct its_flash_info_t its_flash_info_external
Initial value:
= {
.flash_dev = (void *) &PS_FLASH_DEV_NAME ,
.fs_info = {0, 0},
.sector_size = PS_SECTOR_SIZE,
.block_size = (PS_SECTOR_SIZE * PS_SECTORS_PER_BLOCK) ,
.num_blocks = 0,
.program_unit = PS_FLASH_PROGRAM_UNIT ,
.max_file_size = ITS_UTILS_ALIGN(PS_MAX_OBJECT_SIZE, PS_FLASH_PROGRAM_UNIT ) ,
.max_num_files = PS_MAX_NUM_OBJECTS ,
.erase_val = 0xFFU ,
}
psa_status_t its_flash_nor_erase(const struct its_flash_info_t *info, uint32_t block_id)
Erases block ID data.
Definition: its_flash_nor.c:79
psa_status_t its_flash_nor_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.
Definition: its_flash_nor.c:55
psa_status_t its_flash_nor_flush(const struct its_flash_info_t *info)
Flushes modifications to a block to flash.
Definition: its_flash_nor.c:70
#define PS_MAX_OBJECT_SIZE
psa_status_t its_flash_nor_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.
Definition: its_flash_nor.c:40
psa_status_t its_flash_nor_init(const struct its_flash_info_t *info)
Initialize the Flash Interface.
Definition: its_flash_nor.c:28
#define PS_MAX_NUM_OBJECTS
Specifies the maximum number of objects in the system, which is the number of defined assets...
ARM_DRIVER_FLASH PS_FLASH_DEV_NAME
#define ITS_UTILS_ALIGN(x, a)
Aligns a value up to the provided alignment.
Definition: its_utils.h:56

Definition at line 99 of file its_flash_info_external.c.

ARM_DRIVER_FLASH PS_FLASH_DEV_NAME