diff options
| author | Robert Kukla <roolku@rockbox.org> | 2007-02-28 13:20:36 +0000 |
|---|---|---|
| committer | Robert Kukla <roolku@rockbox.org> | 2007-02-28 13:20:36 +0000 |
| commit | 50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324 (patch) | |
| tree | d5197ea90c5dcfa574b84743ecbbd7fa2a754e55 /firmware/common/timefuncs.c | |
| parent | 343c428f2cf97c82540aecf07d154e43ff40e79a (diff) | |
| download | rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.zip rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.tar.gz rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.tar.bz2 rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.tar.xz | |
FS#6419 - driver for H1x0 series RTC Mod with runtime detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/timefuncs.c')
| -rw-r--r-- | firmware/common/timefuncs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index e48aadd..881bc23 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -49,6 +49,19 @@ struct tm *get_time(void) #ifdef CONFIG_RTC static long timeout = 0; +#if CONFIG_RTC == RTC_DS1339_DS3231 + if(!rtc_detected) { + tm.tm_sec = 0; + tm.tm_min = 0; + tm.tm_hour = 0; + tm.tm_mday = 1; + tm.tm_mon = 0; + tm.tm_year = 70; + tm.tm_wday = 1; + tm.tm_yday = 0; /* Not implemented for now */ + tm.tm_isdst = -1; /* Not implemented for now */ + } else +#endif /* Don't read the RTC more than once per second */ if (current_tick > timeout) { char rtcbuf[7]; |