lwip-eth for Seeed Arch Max.

Fork of lwip-eth-arch-max-dev by Yihui Xiong

Files at this revision

API Documentation at this revision

Comitter:
hillkim7
Date:
Sat Apr 25 05:57:08 2015 +0000
Parent:
26:5fa145f66aa0
Commit message:
Let't user can change MAC address.

Changed in this revision

arch/TARGET_STM/stm32f4_emac.c Show annotated file Show diff for this revision Revisions of this file
--- a/arch/TARGET_STM/stm32f4_emac.c	Mon Mar 02 12:46:32 2015 +0000
+++ b/arch/TARGET_STM/stm32f4_emac.c	Sat Apr 25 05:57:08 2015 +0000
@@ -178,12 +178,16 @@
     heth.Init.Speed = ETH_SPEED_10M;
     heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
     heth.Init.PhyAddress = 1;
+#if (MBED_MAC_ADDRESS_SUM != MBED_MAC_ADDR_INTERFACE)
     MACAddr[0] = 0x00;
     MACAddr[1] = 0x80;
     MACAddr[2] = 0xE1;
     MACAddr[3] = 0x00;
     MACAddr[4] = 0x00;
     MACAddr[5] = 0x00;
+#else
+    mbed_mac_address((char *)MACAddr);
+#endif
     heth.Init.MACAddr = &MACAddr[0];
     heth.Init.RxMode = ETH_RXINTERRUPT_MODE;
     heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE;