From 48b00f320a7e2222a6add2c62fe2b900ac477490 Mon Sep 17 00:00:00 2001 From: Adrian Bowyer Date: Wed, 7 May 2014 17:26:35 +0100 Subject: [PATCH] Small modifications made to allow the MAC address to be set. This must be done before calls to any other function. --- Lwip/lwip/src/sam/netif/ethernetif.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Lwip/lwip/src/sam/netif/ethernetif.c b/Lwip/lwip/src/sam/netif/ethernetif.c index 8db30d9..63929ed 100644 --- a/Lwip/lwip/src/sam/netif/ethernetif.c +++ b/Lwip/lwip/src/sam/netif/ethernetif.c @@ -89,7 +89,8 @@ #define NET_RW_BUFF_SIZE 1536 /** The MAC address used for the test */ -static u8_t gs_uc_mac_address[] = +// ***AB - gs_uc_mac_address used to be static. Removed so it can be hacked +u8_t gs_uc_mac_address[] = { ETHERNET_CONF_ETHADDR0, ETHERNET_CONF_ETHADDR1, ETHERNET_CONF_ETHADDR2, ETHERNET_CONF_ETHADDR3, ETHERNET_CONF_ETHADDR4, ETHERNET_CONF_ETHADDR5}; @@ -109,6 +110,14 @@ struct ethernetif { //*****************************AB +void RepRapNetworkSetMACAddress(const u8_t mac[]) +{ + int8_t i; + + for(i = 0; i < 6; i++) + gs_uc_mac_address[i] = mac[i]; +} + bool ethernetif_phy_link_status() { uint32_t p_ul_reg_cont;