Skip to content
eeprom.h 620 B
Newer Older
#ifndef HN70AP_EEPROM_H
#define HN70AP_EEPROM_H

f4grx's avatar
f4grx committed
#include <stdint.h>
#include <stdbool.h>
#include <netinet/in.h>
f4grx's avatar
f4grx committed
#define TYPE_BOOL 1 /* 8 bools mapped in 1 byte */
#define TYPE_IP   2 /* 4 bytes */

/* Name of the EEPROM device */
f4grx's avatar
f4grx committed

#define Hn70AP_EECONFIG_DEVICE "/dev/eeprom"

/* Routines usable by all applications */

/* Initialize the EEPROM configuration management */
int hn70ap_eeconfig_init(void);
f4grx's avatar
f4grx committed
int hn70ap_eeconfig_describe(int index, char *namebuf, int namebuflen, uint32_t *type);
int hn70ap_eeconfig_getbool(char *name, bool *value);
int hn70ap_eeconfig_getip(char *name, struct in_addr *value);