FUNCTIONAL Update from mbed v49: Add APIs for setName/getName so device is name addressible. Also APIs for getting link stats. Also, minor derivative to reduce compiler warnings and tag read-only parameters as const.

Dependencies:   Socket lwip-eth lwip-sys lwip

Dependents:   WattEye X10Svr SSDP_Server

Fork of EthernetInterface by mbed official

Revision:
53:bbcf2853e575
Parent:
50:957161ecdd16
--- a/EthernetInterface_Mods.hxx	Thu Apr 06 23:20:38 2017 +0000
+++ b/EthernetInterface_Mods.hxx	Sun Apr 09 20:58:42 2017 +0000
@@ -62,4 +62,18 @@
 
 uint32_t EthernetInterface::mii_read_data(void) {
     return lpc_mii_read_data();  // 16-bit MRDD - address 0x2008 4030
-}  
\ No newline at end of file
+}
+
+void EthernetInterface::LinkBlinkOnTraffic(int BlinkIt)
+{
+    uint32_t data;
+    
+    if (lpc_mii_read(0x19, &data) == ERR_OK) {
+        data &= ~(1 << 5);      // Mode 2, link status blinks on data
+        if (!BlinkIt)
+            data |= (1 << 5);   // Mode 1, link status only
+        if (lpc_mii_write(0x19, data) != ERR_OK) {
+            printf("LED Reconfig attempt failed.\r\n");
+        }
+    }
+}