rearrange configblock

This commit is contained in:
2021-02-16 12:09:08 +01:00
parent a711fcbe2a
commit f58538ab79
3 changed files with 3 additions and 5 deletions

View File

@ -4,16 +4,16 @@
#include <stdint.h>
#include <sha256.h>
#define CONFIG_MAGIC 0xdead0007
#define CONFIG_MAGIC 0xdead0008
typedef struct __attribute__((__packed__)) s_configBlock {
uint32_t configMagic;
char deviceName[16];
uint8_t macAddress[6];
char ntpServer[48];
char deviceId[16];
char sharedSecret[SHA256_BLOCK_SIZE];
char sinkServer[48];
uint8_t macAddress[6];
uint8_t filler[22];
} t_configBlock;

View File

@ -25,7 +25,6 @@ typedef struct __attribute__((__packed__)) s_deviceStats {
} t_deviceStats;
static_assert((sizeof(t_deviceStats) <= EEPROM_WRITE_BLOCK_SIZE), "t_deviceStats has illegal size, must be less than or equal 32");
static_assert((sizeof(t_configBlock) % 32 == 0), "t_configBlock has illegal size, must be dividable by 32");
#define EEPROM_BASE_ADDR 0