Page 1 of 1

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

Posted: Thu Sep 15, 2016 7:09 pm
by DarkSide
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.

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

Posted: Mon Oct 10, 2016 9:49 pm
by eriksl
+1

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

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

Posted: Mon Nov 21, 2016 6:19 pm
by DarkSide
Is this forum alive? Will I hear any response from Espressif related person?

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

Posted: Wed Dec 07, 2016 10:45 pm
by pratik
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!