6#ifndef __LIBDRAGON_EEPROMFS_H
7#define __LIBDRAGON_EEPROMFS_H
18#define EEPFS_ESUCCESS 0
20#define EEPFS_EBADINPUT -1
22#define EEPFS_ENOFILE -2
24#define EEPFS_EBADFS -3
26#define EEPFS_ENOMEM -4
28#define EEPFS_EBADHANDLE -5
30#define EEPFS_ECONFLICT -6
79int eepfs_read(
const char * path,
void * dest,
size_t size);
80int eepfs_write(
const char * path,
const void * src,
size_t size);
bool eepfs_verify_signature(void)
Validates the first block of EEPROM.
Definition: eepromfs.c:475
int eepfs_read(const char *path, void *dest, size_t size)
Reads an entire file from the EEPROM filesystem.
Definition: eepromfs.c:351
int eepfs_close(void)
De-initializes the EEPROM filesystem.
Definition: eepromfs.c:322
const char * path
File path.
Definition: eepromfs.h:57
int eepfs_init(const eepfs_entry_t *entries, size_t count)
Initializes the EEPROM filesystem.
Definition: eepromfs.c:237
size_t size
File size in bytes.
Definition: eepromfs.h:73
int eepfs_write(const char *path, const void *src, size_t size)
Writes an entire file to the EEPROM filesystem.
Definition: eepromfs.c:388
int eepfs_erase(const char *path)
Erases a file in the EEPROM filesystem.
Definition: eepromfs.c:426
void eepfs_wipe(void)
Erases all blocks in EEPROM and sets a new signature.
Definition: eepromfs.c:506
EEPROM filesystem configuration file entry.
Definition: eepromfs.h:42