Wirepas SDK
persistent.h
Go to the documentation of this file.
1 /* Copyright 2018 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 #ifndef PERSISTENT_H_
7 #define PERSISTENT_H_
8 
9 #define PERSISTENT_MAGIC_KEY (uint32_t)0xA133F0E8
10 
14 typedef enum
15 {
23 
37 persistent_res_e Mcu_Persistent_read(uint8_t * data, uint16_t offset, uint16_t len);
38 
53  uint16_t offset,
54  uint16_t len);
55 
65 persistent_res_e Mcu_Persistent_isValid(uint32_t magic_key);
66 
72 
73 
74 #endif /* PERSISTENT_H_ */
persistent_res_e
persistent_res_e
List of return code.
Definition: persistent.h:14
PERSISTENT_RES_DATA_AREA_OVERFLOW
@ PERSISTENT_RES_DATA_AREA_OVERFLOW
Definition: persistent.h:19
Mcu_Persistent_getMaxSize
uint8_t Mcu_Persistent_getMaxSize()
Get persistent memory maximum data size.
PERSISTENT_RES_MAGIC_KEY_NOT_VALID
@ PERSISTENT_RES_MAGIC_KEY_NOT_VALID
Definition: persistent.h:21
Mcu_Persistent_isValid
persistent_res_e Mcu_Persistent_isValid(uint32_t magic_key)
Check persistent memory data validity by checking magic key value.
Mcu_Persistent_write
persistent_res_e Mcu_Persistent_write(uint8_t *data, uint16_t offset, uint16_t len)
Writing data to persistent memory.
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.
PERSISTENT_RES_OK
@ PERSISTENT_RES_OK
Definition: persistent.h:17