diff options
| author | Markus Braun <markus.braun@krawel.de> | 2002-08-09 13:50:58 +0000 |
|---|---|---|
| committer | Markus Braun <markus.braun@krawel.de> | 2002-08-09 13:50:58 +0000 |
| commit | 2012acf0a805793d970621ec0ab32bdb2b6ebd61 (patch) | |
| tree | cc5c47180458aa83df42ba905bcb8dfc9c9f74d0 /apps/settings_menu.c | |
| parent | 3181f68eff2951029e56293e6003eff34c499584 (diff) | |
| download | rockbox-2012acf0a805793d970621ec0ab32bdb2b6ebd61.zip rockbox-2012acf0a805793d970621ec0ab32bdb2b6ebd61.tar.gz rockbox-2012acf0a805793d970621ec0ab32bdb2b6ebd61.tar.bz2 rockbox-2012acf0a805793d970621ec0ab32bdb2b6ebd61.tar.xz | |
changed display format for time/date setting menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1646 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
| -rw-r--r-- | apps/settings_menu.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 948f1eb..b2ca475 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -87,22 +87,22 @@ static void statusbar(void) #ifdef HAVE_RTC static void timedate_set(void) { - int timedate[7]; /* hour,minute,second,day,month,year,dayofweek */ + int timedate[7]; /* hour,minute,second,year,month,day,dayofweek */ timedate[0] = rtc_read(0x03); /* hour */ timedate[1] = rtc_read(0x02); /* minute */ timedate[2] = rtc_read(0x01); /* second */ - timedate[3] = rtc_read(0x05); /* day */ + timedate[3] = rtc_read(0x07); /* year */ timedate[4] = rtc_read(0x06); /* month */ - timedate[5] = rtc_read(0x07); /* year */ + timedate[5] = rtc_read(0x05); /* day */ /* day of week not read, calculated */ timedate[0] = ((timedate[0] & 0x70) >> 4) * 10 + (timedate[0] & 0x0f); /* hour */ timedate[1] = ((timedate[1] & 0xf0) >> 4) * 10 + (timedate[1] & 0x0f); /* minute */ timedate[2] = ((timedate[2] & 0x30) >> 4) * 10 + (timedate[2] & 0x0f); /* second */ - timedate[3] = ((timedate[3] & 0x30) >> 4) * 10 + (timedate[3] & 0x0f); /* day */ + timedate[3] = ((timedate[3] & 0x30) >> 4) * 10 + (timedate[3] & 0x0f); /* year */ timedate[4] = ((timedate[4] & 0x30) >> 4) * 10 + (timedate[4] & 0x0f); /* month */ - timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f); /* year */ + timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f); /* day */ set_time("[Set time/date]",timedate); @@ -110,16 +110,16 @@ static void timedate_set(void) timedate[0] = ((timedate[0]/10) << 4 | timedate[0]%10) & 0x3f; /* hour */ timedate[1] = ((timedate[1]/10) << 4 | timedate[1]%10) & 0x7f; /* minute */ timedate[2] = ((timedate[2]/10) << 4 | timedate[2]%10) & 0x7f; /* second */ - timedate[3] = ((timedate[3]/10) << 4 | timedate[3]%10) & 0x3f; /* day */ + timedate[3] = ((timedate[3]/10) << 4 | timedate[3]%10) & 0xff; /* year */ timedate[4] = ((timedate[4]/10) << 4 | timedate[4]%10) & 0x1f; /* month */ - timedate[5] = ((timedate[5]/10) << 4 | timedate[5]%10) & 0xff; /* year */ + timedate[5] = ((timedate[5]/10) << 4 | timedate[5]%10) & 0x3f; /* day */ rtc_write(0x03, timedate[0] | (rtc_read(0x03) & 0xc0)); /* hour */ rtc_write(0x02, timedate[1] | (rtc_read(0x02) & 0x80)); /* minute */ rtc_write(0x01, timedate[2] | (rtc_read(0x01) & 0x80)); /* second */ - rtc_write(0x05, timedate[3] | (rtc_read(0x05) & 0xc0)); /* day */ + rtc_write(0x07, timedate[3]); /* year */ rtc_write(0x06, timedate[4] | (rtc_read(0x06) & 0xe0)); /* month */ - rtc_write(0x07, timedate[5]); /* year */ - rtc_write(0x04, timedate[6] | (rtc_read(0x04) & 0x07)); /* dayofweek */ + rtc_write(0x05, timedate[5] | (rtc_read(0x05) & 0xc0)); /* day */ + rtc_write(0x04, timedate[6] | (rtc_read(0x04) & 0xf8)); /* dayofweek */ rtc_write(0x00, 0x00); /* 0.1 + 0.01 seconds */ } } |