Go to the documentation of this file.
62 #include "periph_cpu.h"
63 #include "periph_conf.h"
69 #ifndef EEPROM_RESERV_CPU_LOW
75 #define EEPROM_RESERV_CPU_LOW (0U)
78 #ifndef EEPROM_RESERV_CPU_HI
84 #define EEPROM_RESERV_CPU_HI (0U)
87 #ifndef EEPROM_RESERV_BOARD_LOW
93 #define EEPROM_RESERV_BOARD_LOW (0U)
96 #ifndef EEPROM_RESERV_BOARD_HI
102 #define EEPROM_RESERV_BOARD_HI (0U)
108 #if (EEPROM_SIZE > 0x1000000)
109 #define EEPREG_PTR_LEN (4U)
110 #elif (EEPROM_SIZE > 0x10000)
111 #define EEPREG_PTR_LEN (3U)
112 #elif (EEPROM_SIZE > 0x100)
113 #define EEPREG_PTR_LEN (2U)
115 #define EEPREG_PTR_LEN (1U)
147 int eepreg_add(uint32_t *pos,
const char *name, uint32_t len);
179 int eepreg_write(uint32_t *pos,
const char *name, uint32_t len);
252 int eepreg_len(uint32_t *len,
const char *name);
int eepreg_free(uint32_t *len)
Calculate length of remaining EEPROM free space.
int eepreg_add(uint32_t *pos, const char *name, uint32_t len)
Load or write meta-data in EEPROM registry.
int eepreg_len(uint32_t *len, const char *name)
Calculate data length from meta-data in EEPROM registry.
int eepreg_rm(const char *name)
Remove entry from EEPROM registry and free space.
int eepreg_write(uint32_t *pos, const char *name, uint32_t len)
Write meta-data to EEPROM registry.
int eepreg_check(void)
Check for the presence of meta-data registry.
int eepreg_reset(void)
Clear existing meta-data registry.
int eepreg_iter(eepreg_iter_cb_t cb, void *arg)
Iterate over meta-data entries in EEPROM registry.
int(* eepreg_iter_cb_t)(char *name, void *arg)
Signature of callback for iterating over entries in EEPROM registry.
int eepreg_read(uint32_t *pos, const char *name)
Read position meta-data from EEPROM registry.