1.2.15 System Time Control
This topic provides information on how the WINC system time can be controlled and queried.
The WINC device maintains a system time internally. Time can be set in two ways, by an NTP query from the WINC device to an NTP server or by the host MCU configuring the desired time.
The source of the time, either none, NTP or MCU can be configured by calling the function WDRV_WINC_SystemTimeSetSource. If the host MCU is providing the time the function WDRV_WINC_SystemTimeSetCurrent allows the application to set the current time using UTC format.
The WINC can provide the current time to the application by calling the function WDRV_WINC_SystemTimeGetCurrent and providing a callback which will be called when the time is returned from the WINC device.
The WINC device used a structure tstrSystemTime to transfer some time events. Two functions are provided in the WINC Driver to assist translating between this local structure and UTC time. These functions are WDRV_WINC_LocalTimeToUTC and WDRV_WINC_UTCToLocalTime.