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
Diff: ntp.cpp
- Revision:
- 4:31fa7d50722c
- Parent:
- 1:5f70c361db20
- Child:
- 7:b794780e33b4
--- a/ntp.cpp Sat Jan 28 19:10:30 2017 +0000 +++ b/ntp.cpp Wed Feb 01 07:41:03 2017 +0000 @@ -1,4 +1,5 @@ #include "mbed.h" +#include "log.h" #include "net.h" #include "clock.h" #include "sync.h" @@ -76,11 +77,11 @@ pHeader->TraTimeStamp = makeNtpTimeStamp(ClockGetNs()); return HEADER_SIZE; default: - printf("\r\nNTP packet unknown\r\n"); - printf("Mode %d\r\n", pHeader->Mode); - printf("Version %d\r\n", pHeader->VN); - printf("Stratum %d\r\n", pHeader->Stratum); - printf("Reference %4s\r\n", pHeader->RefIdentifier); + LogTimeF("\r\nNTP packet unknown\r\n"); + LogTimeF("Mode %d\r\n", pHeader->Mode); + LogTimeF("Version %d\r\n", pHeader->VN); + LogTimeF("Stratum %d\r\n", pHeader->Stratum); + LogTimeF("Reference %4s\r\n", pHeader->RefIdentifier); } return 0; }