Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: xj-Init-clock-to-compile-time-if-not-already-initialized-ds1302
Homepage
Parse compiler DATE and TIME into a time_t structure¶
I use this to initialize the system time RTC using set_time() to a value parsed from the DATE and TIME strings. I find it easier to recompile and reload the firmware than it is to manually type the time string.
Sample Use¶
https://developer.mbed.org/users/joeata2wh/code/xj-Init-clock-to-compile-time-if-not-alr extends the use of this library to set the DS1302 clock chip to the compile time only the first time the utility runs. After that it detects a sentinel already stored in the clock chip and used the previously saved time.
Referenced: