diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-02-13 00:45:49 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-02-13 00:45:49 +0000 |
commit | 4532d145f17e5beb7e921cf459c7f8e27bcd58fd (patch) | |
tree | dabcb8c70eb9887db7b3fbcd0f3daf48d12780fe /firmware/common/timefuncs.c | |
parent | c16e563aef9099cfd9c87b7d1d544f466a073211 (diff) |
Onda VX747:
* Add preliminary keymap
* Split up generic MIPS stuff from Ingenic specific
* Make apps/ compilable
* Add SD driver
* Fix RTC driver
* Add debug screen
* Other cleanups/rewrites/fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19993 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/timefuncs.c')
-rw-r--r-- | firmware/common/timefuncs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index d46b961a8c..53ca5f3c16 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -104,10 +104,13 @@ int set_time(const struct tm *tm) { #if CONFIG_RTC int rc; +#if CONFIG_RTC != RTC_JZ47XX char rtcbuf[7]; +#endif if (valid_time(tm)) { +#if CONFIG_RTC != RTC_JZ47XX rtcbuf[0]=((tm->tm_sec/10) << 4) | (tm->tm_sec%10); rtcbuf[1]=((tm->tm_min/10) << 4) | (tm->tm_min%10); rtcbuf[2]=((tm->tm_hour/10) << 4) | (tm->tm_hour%10); @@ -122,6 +125,9 @@ int set_time(const struct tm *tm) #endif rc = rtc_write_datetime(rtcbuf); +#else + rc = rtc_write_datetime((unsigned char*)tm); +#endif if (rc < 0) return -1; |