Go to the source code of this file.
◆ Mcu_Persistent_getMaxSize()
uint8_t Mcu_Persistent_getMaxSize |
( |
| ) |
|
Get persistent memory maximum data size.
- Returns
- The maximum size of data in bytes
◆ Mcu_Persistent_isValid()
Check persistent memory data validity by checking magic key value.
- Parameters
-
- Returns
- PERSISTENT_RES_OK Succeed PERSISTENT_RES_MAGIC_KEY_NOT_VALID Magic key not valid
◆ Mcu_Persistent_read()
persistent_res_e Mcu_Persistent_read |
( |
uint8_t * |
data, |
|
|
uint16_t |
offset, |
|
|
uint16_t |
len |
|
) |
| |
Reading data from persistent memory from the beginnings.
- Parameters
-
data | Pointer to store raw data from persistent memory |
offset | The offset to read from |
len | Read the desired amount of data length |
- Returns
- PERSISTENT_RES_OK Succeed PERSISTENT_RES_DATA_AREA_OVERFLOW The suggested read data area is too long
◆ Mcu_Persistent_write()
persistent_res_e Mcu_Persistent_write |
( |
uint8_t * |
data, |
|
|
uint16_t |
offset, |
|
|
uint16_t |
len |
|
) |
| |
Writing data to persistent memory.
- Parameters
-
data | Pointer to data to store in persistent memory |
offset | The place where from writing start if not in the beginning |
len | Write the desired amount of data length |
- Returns
- PERSISTENT_RES_OK Succeed PERSISTENT_RES_DATA_AREA_OVERFLOW The suggested write data area or offset place is too long
◆ persistent_res_e
List of return code.
Enumerator |
---|
PERSISTENT_RES_OK | Operation is successful
|
PERSISTENT_RES_DATA_AREA_OVERFLOW | Suggested read or write data area is too long
|
PERSISTENT_RES_MAGIC_KEY_NOT_VALID | Magic key not valid
|
Definition at line 14 of file persistent.h.
◆ PERSISTENT_MAGIC_KEY
#define PERSISTENT_MAGIC_KEY (uint32_t)0xA133F0E8 |