2021-01-09 22:01:21 +01:00
|
|
|
#ifndef _CONFIG_H_
|
|
|
|
#define _CONFIG_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <spi.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
2021-02-07 13:14:35 +01:00
|
|
|
#define CONFIG_MAGIC 0xdead0004
|
2021-01-09 22:01:21 +01:00
|
|
|
|
|
|
|
typedef struct __attribute__((__packed__)) s_configBlock {
|
|
|
|
uint32_t configMagic;
|
|
|
|
char deviceName[16];
|
|
|
|
uint8_t macAddress[6];
|
2021-01-09 23:32:01 +01:00
|
|
|
uint8_t filler[6];
|
2021-01-09 22:01:21 +01:00
|
|
|
} t_configBlock;
|
|
|
|
|
|
|
|
|
|
|
|
void configInit();
|
|
|
|
t_configBlock* getConfig();
|
|
|
|
|
|
|
|
#endif /* _CONFIG_H_ */
|