SDK 2.0 - make time() function WEAK + SNTP tweaks

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

SDK 2.0 - make time() function WEAK + SNTP tweaks

Postby DarkSide » Thu Sep 15, 2016 7:09 pm

Hello,
In one of my projects I'm using DS3231 clock module and I want to make time() function to return time from this module. The problem is that in new SDK time() function already defined in libmain - that causing linker error. So, please make it weak to allow user to provide it's own implementation.
Futhermore, it would be good if you provide a callback for user when SNTP receive time. Currently to check is SNTP time was updated I need to constantly poll sntp_get_current_timestamp() until it return correct time.

eriksl
Posts: 157
Joined: Fri May 22, 2015 6:22 pm

Re: SDK 2.0 - make time() function WEAK + SNTP tweaks

Postby eriksl » Mon Oct 10, 2016 9:49 pm

+1

Even better, just make all symbols in library weak, like it should, with a library.

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: SDK 2.0 - make time() function WEAK + SNTP tweaks

Postby DarkSide » Mon Nov 21, 2016 6:19 pm

Is this forum alive? Will I hear any response from Espressif related person?

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: SDK 2.0 - make time() function WEAK + SNTP tweaks

Postby pratik » Wed Dec 07, 2016 10:45 pm

Hello,
I will forward this suggestion to the SDK developers. Making internal functions weak causes issues with debugging because libraries are not provided with complete source code. Also, interdependent components inside the SDK get messed up a lot. But will definitely get this through to the developers. Thanks for the feedback!
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 7 guests