Loading...
Searching...
No Matches
eepreg.h File Reference

eepreg interface definitions More...

Detailed Description

eepreg interface definitions

Author
Matthew Blue matth.nosp@m.ew.b.nosp@m.lue.n.nosp@m.euro.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition in file eepreg.h.

#include <stdint.h>
#include "periph_cpu.h"
#include "periph_conf.h"
+ Include dependency graph for eepreg.h:

Go to the source code of this file.

Macros

#define EEPROM_RESERV_CPU_LOW   (0U)
 EEPROM reserved near beginning for use by CPU and related.
 
#define EEPROM_RESERV_CPU_HI   (0U)
 EEPROM reserved near end for use by CPU and related.
 
#define EEPROM_RESERV_BOARD_LOW   (0U)
 EEPROM reserved near beginning for use by board and related.
 
#define EEPROM_RESERV_BOARD_HI   (0U)
 EEPROM reserved near end for use by board and related.
 
#define EEPREG_PTR_LEN   (1U)
 Size in bytes of pointer meta-data in EEPROM.
 

Typedefs

typedef int(* eepreg_iter_cb_t) (char *name, void *arg)
 Signature of callback for iterating over entries in EEPROM registry.
 

Functions

int eepreg_add (uint32_t *pos, const char *name, uint32_t len)
 Load or write meta-data in EEPROM registry.
 
int eepreg_read (uint32_t *pos, const char *name)
 Read position meta-data from EEPROM registry.
 
int eepreg_write (uint32_t *pos, const char *name, uint32_t len)
 Write meta-data to EEPROM registry.
 
int eepreg_rm (const char *name)
 Remove entry from EEPROM registry and free space.
 
int eepreg_iter (eepreg_iter_cb_t cb, void *arg)
 Iterate over meta-data entries in 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_len (uint32_t *len, const char *name)
 Calculate data length from meta-data in EEPROM registry.
 
int eepreg_free (uint32_t *len)
 Calculate length of remaining EEPROM free space.