nvr: add support for UTC time sync

This commit is contained in:
David Hrdlička
2018-08-01 17:52:20 +02:00
parent 3a05287b45
commit a4f6bfde58
6 changed files with 16 additions and 8 deletions

View File

@@ -280,7 +280,7 @@ rtc_start(nvr_t *nvr)
struct tm tm;
/* Initialize the internal and chip times. */
if (enable_sync) {
if (enable_sync & TIME_SYNC_ENABLED) {
/* Use the internal clock's time. */
nvr_time_get(&tm);
rtc_time_set(nvr->regs, &tm);