#include "its_flash.h"
#include "flash_fs/its_flash_fs.h"
#include "tfm_hal_its.h"
#include "tfm_hal_ps.h"
Go to the source code of this file.
#define ITS_MAX_BLOCK_DATA_COPY 256 |
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.
- Parameters
-
[in] | info | Flash device information |
[in] | dst_block | Destination block ID |
[in] | dst_offset | Destination offset position from the init of the destination block |
[in] | src_block | Source block ID |
[in] | src_offset | Source offset position from the init of the source block |
[in] | size | Number of bytes to moves |
- Note
- This function assumes all input values are valid. That is, the address range, based on blockid, offset and size, is a valid range in flash. It also assumes that the destination block is already erased and ready to be written.
- Returns
- Returns PSA_SUCCESS if the function is executed correctly. Otherwise, it returns PSA_ERROR_STORAGE_FAILURE.
Definition at line 56 of file its_flash.c.
Gets the flash info structure for the provided flash device.
- Parameters
-
[in] | id | Identifier of the flash device. |
- Returns
- Pointer to the flash info struct.
Definition at line 27 of file its_flash.c.