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: 159
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?

pratik

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!

Who is online

Users browsing this forum: No registered users and 284 guests