NTP Client library to set local time using the Internet.

Files at this revision

API Documentation at this revision

Comitter:
JavierGC
Date:
Sun Mar 20 19:26:02 2022 +0000
Parent:
0:9282d46b9f92
Commit message:
Rev1.0

Changed in this revision

NTPClient.cpp Show annotated file Show diff for this revision Revisions of this file
NTPClient.h Show annotated file Show diff for this revision Revisions of this file
diff -r 9282d46b9f92 -r 4009de722227 NTPClient.cpp
--- a/NTPClient.cpp	Wed Nov 11 16:50:36 2020 +0000
+++ b/NTPClient.cpp	Sun Mar 20 19:26:02 2022 +0000
@@ -44,7 +44,7 @@
 
 #define NTP_TIMESTAMP_DELTA 2208988800ull   //Diff btw a UNIX timestamp (Starting Jan, 1st 1970) and a NTP timestamp (Starting Jan, 1st 1900)
 
-NTPClient::NTPClient(NetworkInterface& _m_intf) :
+NTPClient::NTPClient(EthernetInterface& _m_intf) :
     m_intf(_m_intf)
 { }
 
diff -r 9282d46b9f92 -r 4009de722227 NTPClient.h
--- a/NTPClient.h	Wed Nov 11 16:50:36 2020 +0000
+++ b/NTPClient.h	Sun Mar 20 19:26:02 2022 +0000
@@ -26,7 +26,7 @@
 
 #include <stdint.h>
 #include "UDPSocket.h"
-#include "NetworkInterface.h"
+#include "EthernetInterface.h"
 
 #define NTP_DEFAULT_PORT    123
 #define NTP_DEFAULT_TIMEOUT 4000
@@ -50,7 +50,7 @@
     /**
     * Instantiate the NTP client
     */
-    NTPClient(NetworkInterface & _m_intf);
+    NTPClient(EthernetInterface & _m_intf);
 
     /**Get current time (blocking)
     Update the time using the server host
@@ -90,7 +90,7 @@
         uint32_t txTm_f;
     } __attribute__ ((packed));
 
-    NetworkInterface & m_intf;
+    EthernetInterface & m_intf;
     UDPSocket m_sock;
 };