mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
lwip2 fixes and time/ntp management
core: +settimeofday() core: +coredecls.h +sntp-lwip2.c core: fix clock_gettime() with micros64() core: honor DST in configTime() core: internal clock is automatically started examples: +esp8266/NTP-TZ-DST.ino lwip2: sntp client removed lwip2: fix crashing with WiFi.softAPConfig(ip,ip,ip) fix #3852
This commit is contained in:
committed by
Ivan Grokhotkov
parent
2f09ea7117
commit
cbfbc1ad63
@ -2986,9 +2986,12 @@
|
||||
--------------------------------------------------
|
||||
*/
|
||||
#define SNTP_SERVER_DNS 1 // SNTP support DNS names through sntp_setservername / sntp_getservername
|
||||
#define SNTP_SERVER_ADDRESS "pool.ntp.org" // default
|
||||
// if SNTP_SERVER_ADDRESS is defined, it always overrides user's config
|
||||
// so we do not define it. sntp server can come from dhcp server, or by
|
||||
// user.
|
||||
//#define SNTP_SERVER_ADDRESS "pool.ntp.org" // default
|
||||
#define SNTP_GET_SERVERS_FROM_DHCP 1
|
||||
#define SNTP_SET_SYSTEM_TIME(t) (sntp_set_system_time(t)) // implemented in lwip2-sntp.c
|
||||
#define SNTP_SET_SYSTEM_TIME_US(t,us) do { struct timeval tv = { t, us }; settimeofday(&tv, NULL); } while (0)
|
||||
|
||||
/*
|
||||
--------------------------------------------------
|
||||
@ -2998,5 +3001,6 @@
|
||||
#include "lwip/debug.h"
|
||||
#include "arch/cc.h"
|
||||
#include "lwip-git-hash.h"
|
||||
#include <sys/time.h> // settimeofday() + struct timeval
|
||||
|
||||
#endif // MYLWIPOPTS_H
|
||||
|
Reference in New Issue
Block a user