27 lines
518 B
C

#ifndef _CONFIG_H_
#define _CONFIG_H_
#include <stdint.h>
#include <sha256.h>
#define CONFIG_MAGIC 0xdead0008
typedef struct __attribute__((__packed__)) s_configBlock {
uint32_t configMagic;
char deviceName[16];
char ntpServer[48];
char deviceId[16];
char sharedSecret[SHA256_BLOCK_SIZE];
char sinkServer[48];
union networkspecific {
uint8_t macAddress[6];
};
uint8_t filler[22];
} t_configBlock;
void configInit();
t_configBlock* getConfig();
#endif /* _CONFIG_H_ */