configuration

This commit is contained in:
2020-11-27 13:32:12 +01:00
parent 0b1c6217c4
commit 975ecf40f9

View File

@ -12,11 +12,20 @@
#include <show.h>
#include <oled.h>
#include <dns.h>
#include <config.h>
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);