configuration
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user