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:
43:bc028d5a6424
Parent:
37:793b39683406
Child:
44:83ce5ace337b
diff -r 222a4f45f916 -r bc028d5a6424 udp/dhcp.cpp
--- a/udp/dhcp.cpp	Sun Oct 15 17:54:09 2017 +0000
+++ b/udp/dhcp.cpp	Thu Oct 19 20:56:58 2017 +0000
@@ -1,5 +1,6 @@
 #include   "mbed.h"
 #include    "log.h"
+#include  "clock.h"
 #include    "net.h"
 #include "action.h"
 #include    "eth.h"
@@ -51,11 +52,14 @@
 
 #define REPEAT_DELAY_TIME 60
 static uint32_t delayTime   = 10000000; //Reset whenever a message is sent and blocks another send until count exceeds REPEAT_DELAY_TIME
-uint32_t DhcpElapsedTime = 0;        //Reset whenever an IP address request has been acknowledged 
-void DhcpTick()
+uint32_t DhcpElapsedTime = 0;           //Reset whenever an IP address request has been acknowledged 
+void DhcpMain()
 {
-    DhcpElapsedTime++;
-          delayTime++;
+    if (ClockTicked)
+    {
+        DhcpElapsedTime++;
+              delayTime++;
+    }
 }
 
 static uint8_t  dhcpMessageType = 0;