Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of OmniWheels by
SNTP
[Applications]
This is simple "SNTP" client for the lwIP raw API. More...
Modules | |
Options | |
Functions | |
void | sntp_init (void) |
Initialize this module. | |
void | sntp_stop (void) |
Stop this module. | |
u8_t | sntp_enabled (void) |
Get enabled state. | |
void | sntp_setoperatingmode (u8_t operating_mode) |
Sets the operating mode. | |
u8_t | sntp_getoperatingmode (void) |
Gets the operating mode. | |
void | sntp_setserver (u8_t idx, const ip_addr_t *server) |
Initialize one of the NTP servers by IP address. | |
const ip_addr_t * | sntp_getserver (u8_t idx) |
Obtain one of the currently configured by IP address (or DHCP) NTP servers. |
Detailed Description
This is simple "SNTP" client for the lwIP raw API.
It is a minimal implementation of SNTPv4 as specified in RFC 4330.
For a list of some public NTP servers, see this link : http://support.ntp.org/bin/view/Servers/NTPPoolServers
Function Documentation
u8_t sntp_enabled | ( | void | ) |
Get enabled state.
Definition at line 586 of file lwip_sntp.c.
u8_t sntp_getoperatingmode | ( | void | ) |
Gets the operating mode.
Definition at line 609 of file lwip_sntp.c.
const ip_addr_t* sntp_getserver | ( | u8_t | idx ) |
Obtain one of the currently configured by IP address (or DHCP) NTP servers.
- Parameters:
-
idx the index of the NTP server
- Returns:
- IP address of the indexed NTP server or "ip_addr_any" if the NTP server has not been configured by address (or at all).
Definition at line 687 of file lwip_sntp.c.
void sntp_init | ( | void | ) |
Initialize this module.
Send out request instantly or after SNTP_STARTUP_DELAY(_FUNC).
Definition at line 536 of file lwip_sntp.c.
void sntp_setoperatingmode | ( | u8_t | operating_mode ) |
Sets the operating mode.
- Parameters:
-
operating_mode one of the available operating modes
Definition at line 597 of file lwip_sntp.c.
void sntp_setserver | ( | u8_t | idx, |
const ip_addr_t * | server | ||
) |
Initialize one of the NTP servers by IP address.
- Parameters:
-
idx the index of the NTP server to set must be < SNTP_MAX_SERVERS server IP address of the NTP server to set
Definition at line 637 of file lwip_sntp.c.
void sntp_stop | ( | void | ) |
Stop this module.
Definition at line 572 of file lwip_sntp.c.
Generated on Fri Jul 22 2022 04:54:09 by
