configuration
This commit is contained in:
@ -12,11 +12,20 @@
|
|||||||
#include <show.h>
|
#include <show.h>
|
||||||
#include <oled.h>
|
#include <oled.h>
|
||||||
#include <dns.h>
|
#include <dns.h>
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static t_configBlock *config;
|
||||||
|
|
||||||
|
/*
|
||||||
wiz_NetInfo netInfo = {
|
wiz_NetInfo netInfo = {
|
||||||
.mac = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0D },
|
.mac = { 0x00, 0xA0, 0x57, 0x05, 0x3E, 0x0D },
|
||||||
.dhcp = NETINFO_DHCP
|
.dhcp = NETINFO_DHCP
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
wiz_NetInfo netInfo;
|
||||||
|
|
||||||
|
|
||||||
#define DHCP_BUFFER_SIZE 2048
|
#define DHCP_BUFFER_SIZE 2048
|
||||||
static uint8_t dhcpBuffer[DHCP_BUFFER_SIZE];
|
static uint8_t dhcpBuffer[DHCP_BUFFER_SIZE];
|
||||||
@ -175,6 +184,10 @@ static void wizPhyLinkHandler(void *handle) {
|
|||||||
|
|
||||||
|
|
||||||
int wizInit() {
|
int wizInit() {
|
||||||
|
config = getConfig();
|
||||||
|
netInfo.dhcp = NETINFO_DHCP;
|
||||||
|
memcpy(netInfo.mac, config->macAddress, 6);
|
||||||
|
|
||||||
coloredMsg(LOG_BLUE, false, "wizI, resetting Ethernet module");
|
coloredMsg(LOG_BLUE, false, "wizI, resetting Ethernet module");
|
||||||
wizReset(true);
|
wizReset(true);
|
||||||
activeDelay(2);
|
activeDelay(2);
|
||||||
|
Reference in New Issue
Block a user