Fix same bug as in r23531 in two more drivers (wrong masking of wday)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23536 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2009-11-05 17:01:22 +00:00
parent 05f29f8d57
commit 070d515049
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ int rtc_read_datetime(struct tm *tm)
tm->tm_min = BCD2DEC(buf[1] & 0x7f);
tm->tm_hour = BCD2DEC(buf[2] & 0x3f);
tm->tm_mday = BCD2DEC(buf[3] & 0x3f);
tm->tm_wday = BCD2DEC(buf[4] & 0x3);
tm->tm_wday = BCD2DEC(buf[4] & 0x7);
tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1;
tm->tm_year = BCD2DEC(buf[6]) + 100;

View file

@ -261,7 +261,7 @@ int rtc_read_datetime(struct tm *tm)
tm->tm_sec = BCD2DEC(buf[0] & 0x7f);
tm->tm_min = BCD2DEC(buf[1] & 0x7f);
tm->tm_hour = BCD2DEC(buf[2] & 0x3f);
tm->tm_wday = BCD2DEC(buf[3] & 0x3);
tm->tm_wday = BCD2DEC(buf[3] & 0x7);
tm->tm_mday = BCD2DEC(buf[4] & 0x3f);
tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1;
tm->tm_year = BCD2DEC(buf[6]) + 100;