2020-11-27 12:29:21 +01:00
|
|
|
#ifndef _CONFIG_H_
|
|
|
|
#define _CONFIG_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <spi.h>
|
|
|
|
|
|
|
|
|
2020-11-27 15:54:16 +01:00
|
|
|
#define CONFIG_MAGIC 0xdead0000
|
|
|
|
|
2020-11-27 12:29:21 +01:00
|
|
|
typedef struct __attribute__((__packed__)) s_configBlock {
|
2020-11-27 15:54:16 +01:00
|
|
|
uint32_t configMagic;
|
2020-11-27 12:29:21 +01:00
|
|
|
char deviceName[16];
|
|
|
|
uint8_t macAddress[6];
|
2020-11-27 13:37:57 +01:00
|
|
|
int32_t frontendThreshold;
|
2020-11-27 13:27:24 +01:00
|
|
|
char brokerName[64];
|
2020-11-27 12:29:21 +01:00
|
|
|
char watchdogTopic[64];
|
|
|
|
char startupTopic[64];
|
|
|
|
char statusTopic[64];
|
|
|
|
char mbusDataTopic[64];
|
2020-11-27 13:27:24 +01:00
|
|
|
char syslogServerName[64];
|
2020-11-27 15:54:16 +01:00
|
|
|
uint8_t filler[2];
|
2020-11-27 12:29:21 +01:00
|
|
|
} t_configBlock;
|
|
|
|
|
|
|
|
void configInit();
|
2020-11-27 13:27:24 +01:00
|
|
|
t_configBlock* getConfig();
|
2020-11-27 12:29:21 +01:00
|
|
|
|
|
|
|
#endif /* _CONFIG_H_ */
|