mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 11:05:39 +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:
@@ -122,6 +122,14 @@ static void obtain_time(void)
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK( esp_event_loop_create_default() );
|
||||
|
||||
/**
|
||||
* NTP server address could be aquired via DHCP,
|
||||
* see LWIP_DHCP_GET_NTP_SRV menuconfig option
|
||||
*/
|
||||
#ifdef LWIP_DHCP_GET_NTP_SRV
|
||||
sntp_servermode_dhcp(1);
|
||||
#endif
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
* Read "Establishing Wi-Fi or Ethernet Connection" section in
|
||||
* examples/protocols/README.md for more information about this function.
|
||||
|
||||
Reference in New Issue
Block a user