From 4ca37156f3e5cf44db8859858342309171cf3f37 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 16 Feb 2021 12:28:31 +0100 Subject: [PATCH] network specific configuration --- cube/User/Inc/config.h | 4 ++-- cube/User/Src/config.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cube/User/Inc/config.h b/cube/User/Inc/config.h index 51f1682..08fdf9b 100644 --- a/cube/User/Inc/config.h +++ b/cube/User/Inc/config.h @@ -13,9 +13,9 @@ typedef struct __attribute__((__packed__)) s_configBlock { char deviceId[16]; char sharedSecret[SHA256_BLOCK_SIZE]; char sinkServer[48]; - union networkspecific { + union { uint8_t macAddress[6]; - }; + } networkspecific; uint8_t filler[22]; } t_configBlock; diff --git a/cube/User/Src/config.c b/cube/User/Src/config.c index e3fa426..e609698 100644 --- a/cube/User/Src/config.c +++ b/cube/User/Src/config.c @@ -10,7 +10,7 @@ t_configBlock defaultConfigBlock = { .configMagic = CONFIG_MAGIC, .deviceName = "MainsCnt", - .macAddress = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0F }, + .networkspecific.macAddress = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0F }, .ntpServer = "0.de.pool.ntp.org", .deviceId = "MainsCnt01", .sharedSecret = "sharedSecretGanzGeheim",