|
ESP8266 Centre + NB
|

宏定义 | |
| #define | sntp_servermode_dhcp(x) |
函数 | |
| uint32 | sntp_get_current_timestamp () |
| char * | sntp_get_real_time (long t) |
| sint8 | sntp_get_timezone (void) |
| bool | sntp_set_timezone (sint8 timezone) |
| void | sntp_init (void) |
| void | sntp_stop (void) |
| void | sntp_setserver (unsigned char idx, ip_addr_t *addr) |
| ip_addr_t | sntp_getserver (unsigned char idx) |
| void | sntp_setservername (unsigned char idx, char *server) |
| char * | sntp_getservername (unsigned char idx) |
| #define sntp_servermode_dhcp | ( | x | ) |
| uint32 sntp_get_current_timestamp | ( | ) |
get the seconds since Jan 01, 1970, 00:00 (GMT + 8)
| char* sntp_get_real_time | ( | long | t | ) |
get real time (GTM + 8 time zone)
| sint8 sntp_get_timezone | ( | void | ) |
SNTP get time_zone default GMT + 8
| void sntp_init | ( | void | ) |
Initialize this module. Send out request instantly or after SNTP_STARTUP_DELAY(_FUNC).
| void sntp_stop | ( | void | ) |
Stop this module.
| void sntp_setserver | ( | unsigned char | idx, |
| ip_addr_t * | addr | ||
| ) |
Initialize one of the NTP servers by IP address
| numdns | the index of the NTP server to set must be < SNTP_MAX_SERVERS |
| dnsserver | IP address of the NTP server to set |
| ip_addr_t sntp_getserver | ( | unsigned char | idx | ) |
Obtain one of the currently configured by IP address (or DHCP) NTP servers
| numdns | the index of the NTP server |
| void sntp_setservername | ( | unsigned char | idx, |
| char * | server | ||
| ) |
Initialize one of the NTP servers by name
| numdns | the index of the NTP server to set must be < SNTP_MAX_SERVERS,now sdk support SNTP_MAX_SERVERS = 3 |
| dnsserver | DNS name of the NTP server to set, to be resolved at contact time |
| char* sntp_getservername | ( | unsigned char | idx | ) |
Obtain one of the currently configured by name NTP servers.
| numdns | the index of the NTP server |
1.8.6