mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
lwip: menuconfig option to enable ntp servers option request via DHCP
This could be toggled on/off, off is the default. SNTP debug option. Example update for ntp via DHCP Signed-off-by: Emil Muratov <gpm@hotplug.ru>
This commit is contained in:
@@ -910,6 +910,15 @@
|
||||
#define TCP_DEBUG LWIP_DBG_OFF
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SNTP_DEBUG: Enable debugging for SNTP.
|
||||
*/
|
||||
#ifdef CONFIG_LWIP_SNTP_DEBUG
|
||||
#define SNTP_DEBUG LWIP_DBG_ON
|
||||
#else
|
||||
#define SNTP_DEBUG LWIP_DBG_OFF
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MEMP_DEBUG: Enable debugging in memp.c.
|
||||
*/
|
||||
@@ -1075,9 +1084,13 @@ LWIP_FORWARD_DECLARE_C_CXX void sntp_sync_time(struct timeval *tv);
|
||||
LWIP_FORWARD_DECLARE_C_CXX uint32_t sntp_get_sync_interval(void);
|
||||
|
||||
// Max number of SNTP servers handled (default equal to LWIP_DHCP_MAX_NTP_SERVERS)
|
||||
#if CONFIG_LWIP_SNTP_MAX_SERVERS_DEFINED && !defined SNTP_MAX_SERVERS
|
||||
#if defined CONFIG_LWIP_SNTP_MAX_SERVERS
|
||||
#define SNTP_MAX_SERVERS CONFIG_LWIP_SNTP_MAX_SERVERS
|
||||
#endif // CONFIG_LWIP_SNTP_MAX_SERVERS_DEFINED
|
||||
#endif // CONFIG_LWIP_SNTP_MAX_SERVERS
|
||||
|
||||
#ifdef CONFIG_LWIP_DHCP_GET_NTP_SRV
|
||||
#define LWIP_DHCP_GET_NTP_SRV CONFIG_LWIP_DHCP_GET_NTP_SRV
|
||||
#endif // CONFIG_LWIP_DHCP_GET_NTP_SRV
|
||||
|
||||
/** Set this to 1 to support DNS names (or IP address strings) to set sntp servers
|
||||
* One server address/name can be defined as default if SNTP_SERVER_DNS == 1:
|
||||
|
Reference in New Issue
Block a user