From 975ecf40f9c6091e0cf802ea5657f4bf2e0af37c Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 27 Nov 2020 13:32:12 +0100 Subject: [PATCH] configuration --- cube/User/Src/wizHelper.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cube/User/Src/wizHelper.c b/cube/User/Src/wizHelper.c index 4422644..5627eb4 100644 --- a/cube/User/Src/wizHelper.c +++ b/cube/User/Src/wizHelper.c @@ -12,11 +12,20 @@ #include #include #include +#include + + +static t_configBlock *config; + +/* wiz_NetInfo netInfo = { .mac = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0D }, .dhcp = NETINFO_DHCP }; +*/ +wiz_NetInfo netInfo; + #define DHCP_BUFFER_SIZE 2048 static uint8_t dhcpBuffer[DHCP_BUFFER_SIZE]; @@ -175,6 +184,10 @@ static void wizPhyLinkHandler(void *handle) { int wizInit() { + config = getConfig(); + netInfo.dhcp = NETINFO_DHCP; + memcpy(netInfo.mac, config->macAddress, 6); + coloredMsg(LOG_BLUE, false, "wizI, resetting Ethernet module"); wizReset(true); activeDelay(2);