forked from len0rd/rockbox
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
This commit is contained in:
parent
bd06769ba2
commit
ebb612fbcc
9 changed files with 503 additions and 44 deletions
|
|
@ -52,10 +52,12 @@ struct tm *get_time(void)
|
|||
static long timeout = 0;
|
||||
|
||||
/* Don't read the RTC more than once per second */
|
||||
if (current_tick > timeout) {
|
||||
char rtcbuf[7];
|
||||
if (current_tick > timeout)
|
||||
{
|
||||
/* Once per second, 1/10th of a second off */
|
||||
timeout = HZ * (current_tick / HZ + 1) + HZ / 5;
|
||||
#if CONFIG_RTC != RTC_JZ47XX
|
||||
char rtcbuf[7];
|
||||
rtc_read_datetime(rtcbuf);
|
||||
|
||||
tm.tm_sec = ((rtcbuf[0] & 0x70) >> 4) * 10 + (rtcbuf[0] & 0x0f);
|
||||
|
|
@ -76,6 +78,9 @@ struct tm *get_time(void)
|
|||
|
||||
tm.tm_yday = 0; /* Not implemented for now */
|
||||
tm.tm_isdst = -1; /* Not implemented for now */
|
||||
#else
|
||||
rtc_read_datetime((unsigned char*)&tm);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
tm.tm_sec = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue