1
0
Fork 0
forked from len0rd/rockbox

Corrected bit masks for time setting menu.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2080 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Markus Braun 2002-08-30 11:14:52 +00:00
parent 6131a3cc0d
commit e6c7c841b9

View file

@ -129,11 +129,11 @@ static Menu timedate_set(void)
timedate[4] = rtc_read(0x06); /* month */ timedate[4] = rtc_read(0x06); /* month */
timedate[5] = rtc_read(0x05); /* day */ timedate[5] = rtc_read(0x05); /* day */
/* day of week not read, calculated */ /* day of week not read, calculated */
timedate[0] = ((timedate[0] & 0x70) >> 4) * 10 + (timedate[0] & 0x0f); /* hour */ timedate[0] = ((timedate[0] & 0x30) >> 4) * 10 + (timedate[0] & 0x0f); /* hour */
timedate[1] = ((timedate[1] & 0xf0) >> 4) * 10 + (timedate[1] & 0x0f); /* minute */ timedate[1] = ((timedate[1] & 0x70) >> 4) * 10 + (timedate[1] & 0x0f); /* minute */
timedate[2] = ((timedate[2] & 0x30) >> 4) * 10 + (timedate[2] & 0x0f); /* second */ timedate[2] = ((timedate[2] & 0x70) >> 4) * 10 + (timedate[2] & 0x0f); /* second */
timedate[3] = ((timedate[3] & 0x30) >> 4) * 10 + (timedate[3] & 0x0f); /* year */ timedate[3] = ((timedate[3] & 0xf0) >> 4) * 10 + (timedate[3] & 0x0f); /* year */
timedate[4] = ((timedate[4] & 0x30) >> 4) * 10 + (timedate[4] & 0x0f); /* month */ timedate[4] = ((timedate[4] & 0x10) >> 4) * 10 + (timedate[4] & 0x0f); /* month */
timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f); /* day */ timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f); /* day */
set_time("[Set time/date]",timedate); set_time("[Set time/date]",timedate);