SNTP example...

kurtzweber
Posts: 64
Joined: Tue Jan 10, 2017 1:09 pm

SNTP example...

Postby kurtzweber » Tue Feb 28, 2017 3:00 pm

Hi

I'm trying to understand the snmp example but I'm stuck... can you clarify my dubts?

I used lwIP in the past and I usually was required to define in my code the macro:

SNTP_SET_SYSTEM_TIME (or its equivalent for microsecond precision)

with the specific code for my chip (update rtc registers...)... and I expected the same here in the esp-idf framework... I cannot find the lines of code that configure the esp32 RTC and so on...

Thanks!

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: SNTP example...

Postby ESP_igrr » Tue Feb 28, 2017 3:08 pm

In ESP-IDF version of LwIP, SNTP_SET_SYSTEM_TIME is defined to use settimeofday function. This function, in turn, implements timekeeping using the RTC timer. You can also call settimeofday function manually to set time from some other source.

kurtzweber
Posts: 64
Joined: Tue Jan 10, 2017 1:09 pm

Re: SNTP example...

Postby kurtzweber » Tue Feb 28, 2017 3:10 pm

Thanks! can you point me to the file where it is defined? I probably missed it in my search :roll:

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: SNTP example...

Postby WiFive » Tue Feb 28, 2017 3:51 pm


kurtzweber
Posts: 64
Joined: Tue Jan 10, 2017 1:09 pm

Re: SNTP example...

Postby kurtzweber » Wed Mar 01, 2017 8:27 am

Thanks! 8-)

Who is online

Users browsing this forum: Google [Bot] and 67 guests