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(); }