A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Revision:
97:d91f7db00235
Parent:
86:55bc5ddac16c
Child:
98:b977424ec7f7
diff -r 43eb7a110f1a -r d91f7db00235 link/link.c
--- a/link/link.c	Sat Dec 29 19:03:50 2018 +0000
+++ b/link/link.c	Wed Jan 02 17:48:38 2019 +0000
@@ -9,6 +9,7 @@
 #include   "link.h"
 #include    "nic.h"
 #include    "led.h"
+#include  "fault.h"
 
 #define  LINK_PIN FIO1PIN(25)
 #define SPEED_PIN FIO1PIN(26)
@@ -21,11 +22,17 @@
 
 void LinkMain()
 {
+    FaultPoint = FAULT_POINT_LinkMain;
+    
     //Flash lights
     LinkPhyLink  = ! LINK_PIN;
     LinkPhySpeed = !SPEED_PIN;
     
-    if (!NicLinkIsUp()) return;
+    if (!NicLinkIsUp())
+    {
+        FaultPoint = 0;
+        return;
+    }
     
     //Handle packets
     int sizeRx;
@@ -44,7 +51,7 @@
         LinkActivity = true;
         
         if (pTx) action = EthHandlePacket(pRx, sizeRx, pTx, &sizeTx);
-    
+        
         NicReleaseReceivedPacket();
     }
     
@@ -58,6 +65,7 @@
             NicSendTransmitPacket(sizeTx);
         }
     }
+    FaultPoint = 0;
 }
 
 void LinkInit()