Skip to content

Commit

Permalink
Small modifications made to allow the MAC address to be set.
Browse files Browse the repository at this point in the history
This must be done before calls to any other function.
  • Loading branch information
reprappro committed May 7, 2014
1 parent 1a1a8c8 commit 48b00f3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Lwip/lwip/src/sam/netif/ethernetif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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;
Expand Down

0 comments on commit 48b00f3

Please sign in to comment.