Rtos API example
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 718 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 620 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 703 of file lwip_sntp.c.
Generated on Sun Jul 17 2022 08:25:36 by 1.7.2