From 948785e88208ddeb95db3ba4643e24d623b066ad Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Fri, 27 Oct 2023 14:38:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dsntp=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E7=9A=84=E4=BB=A3=E7=A0=81=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luatos/components/luat/port/luat_sntp_idf5.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/luatos/components/luat/port/luat_sntp_idf5.c b/luatos/components/luat/port/luat_sntp_idf5.c index 31512e06..09301b3a 100644 --- a/luatos/components/luat/port/luat_sntp_idf5.c +++ b/luatos/components/luat/port/luat_sntp_idf5.c @@ -50,13 +50,13 @@ void luat_ntp_autosync(void) { ntp_auto_sync_started = 1; - sntp_setoperatingmode(SNTP_OPMODE_POLL); - sntp_setservername(0, "ntp.aliyun.com"); - sntp_setservername(1, "pool.ntp.org"); + esp_sntp_setoperatingmode(SNTP_OPMODE_POLL); + esp_sntp_setservername(0, "ntp.aliyun.com"); + esp_sntp_setservername(1, "pool.ntp.org"); #ifdef CONFIG_SNTP_TIME_SYNC_METHOD_SMOOTH - sntp_set_sync_mode(SNTP_SYNC_MODE_SMOOTH); + esp_sntp_set_sync_mode(SNTP_SYNC_MODE_SMOOTH); #endif - sntp_set_sync_interval(900*1000); // every 60s - sntp_set_time_sync_notification_cb(my_ntp_cb); - sntp_init(); + esp_sntp_set_sync_interval(900*1000); // every 60s + esp_sntp_set_time_sync_notification_cb(my_ntp_cb); + esp_sntp_init(); }