Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Include file
Description
Source/sntp-c.hContains SNTPc API definitions

Module initialization

Module initialization

Function name
Description
SNTPc_Init()Initialize µC/SNTPc

...

module's objects and tasks. This function must be called prior to any other API

Get time from NTP server

To retrieve the time from a ntp server, SNTPc_ReqRemoteTime  must be call first. This will return a SNTP packet that can be computed by the function SNTPc_GetRemoteTime to retrieve the corrected time. This packet can be also use to find the round trip delay with the function SNTPc_GetRoundTripDly_us. Since the SNTP packet is only use to know the offset between the local and the server NTP time, there is no critical time requirements to call  SNTPc_GetRemoteTime or SNTPc_GetRoundTripDly_us.

...