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.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
sntp.h File Reference
SNTP client API. More...
Go to the source code of this file.
Functions | |
void | sntp_setoperatingmode (u8_t operating_mode) |
Sets the operating mode. | |
u8_t | sntp_getoperatingmode (void) |
Gets the operating mode. | |
void | sntp_init (void) |
Initialize this module. | |
void | sntp_stop (void) |
Stop this module. | |
u8_t | sntp_enabled (void) |
Get enabled state. | |
void | sntp_setserver (u8_t idx, const ip_addr_t *addr) |
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. | |
void | sntp_setservername (u8_t idx, char *server) |
Initialize one of the NTP servers by name. | |
char * | sntp_getservername (u8_t idx) |
Obtain one of the currently configured by name NTP servers. | |
void | sntp_servermode_dhcp (int set_servers_from_dhcp) |
Config SNTP server handling by IP address, name, or DHCP; clear table. |
Detailed Description
SNTP client API.
Definition in file sntp.h.
Function Documentation
char* sntp_getservername | ( | u8_t | idx ) |
Obtain one of the currently configured by name NTP servers.
- Parameters:
-
numdns the index of the NTP server
- Returns:
- IP address of the indexed NTP server or NULL if the NTP server has not been configured by name (or at all)
Definition at line 717 of file lwip_sntp.c.
void sntp_servermode_dhcp | ( | int | set_servers_from_dhcp ) |
Config SNTP server handling by IP address, name, or DHCP; clear table.
- Parameters:
-
set_servers_from_dhcp enable or disable getting server addresses from dhcp
Definition at line 619 of file lwip_sntp.c.
void sntp_setservername | ( | u8_t | idx, |
char * | server | ||
) |
Initialize one of the NTP servers by name.
- Parameters:
-
numdns the index of the NTP server to set must be < SNTP_MAX_SERVERS dnsserver DNS name of the NTP server to set, to be resolved at contact time
Definition at line 702 of file lwip_sntp.c.
Generated on Tue Jul 12 2022 11:03:05 by
