summaryrefslogtreecommitdiff
path: root/firmware/common
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-15 17:17:01 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-15 17:17:01 +0000
commitebb612fbcc87a9547a3603ef6188a26b0760a9aa (patch)
treef2f4432a08aa972dc786bf32fb7cbbfbf5474c5d /firmware/common
parentbd06769ba2cde7875cc06fb73a3d167f4c0bea04 (diff)
downloadrockbox-ebb612fbcc87a9547a3603ef6188a26b0760a9aa.tar.gz
rockbox-ebb612fbcc87a9547a3603ef6188a26b0760a9aa.zip
Onda VX747:
1) Improve touchscreen handling 2) Add RTC driver 4) Add NAND Flash ID scanning 3) Other minor fixes Nand_ID: Add a generic NAND ID database (currently only containg Samsung chips) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18052 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/timefuncs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index 1bf29d203c..d46b961a8c 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -52,10 +52,12 @@ struct tm *get_time(void)
52 static long timeout = 0; 52 static long timeout = 0;
53 53
54 /* Don't read the RTC more than once per second */ 54 /* Don't read the RTC more than once per second */
55 if (current_tick > timeout) { 55 if (current_tick > timeout)
56 char rtcbuf[7]; 56 {
57 /* Once per second, 1/10th of a second off */ 57 /* Once per second, 1/10th of a second off */
58 timeout = HZ * (current_tick / HZ + 1) + HZ / 5; 58 timeout = HZ * (current_tick / HZ + 1) + HZ / 5;
59#if CONFIG_RTC != RTC_JZ47XX
60 char rtcbuf[7];
59 rtc_read_datetime(rtcbuf); 61 rtc_read_datetime(rtcbuf);
60 62
61 tm.tm_sec = ((rtcbuf[0] & 0x70) >> 4) * 10 + (rtcbuf[0] & 0x0f); 63 tm.tm_sec = ((rtcbuf[0] & 0x70) >> 4) * 10 + (rtcbuf[0] & 0x0f);
@@ -76,6 +78,9 @@ struct tm *get_time(void)
76 78
77 tm.tm_yday = 0; /* Not implemented for now */ 79 tm.tm_yday = 0; /* Not implemented for now */
78 tm.tm_isdst = -1; /* Not implemented for now */ 80 tm.tm_isdst = -1; /* Not implemented for now */
81#else
82 rtc_read_datetime((unsigned char*)&tm);
83#endif
79 } 84 }
80#else 85#else
81 tm.tm_sec = 0; 86 tm.tm_sec = 0;