diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-11-05 17:01:22 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-11-05 17:01:22 +0000 |
commit | 070d515049fab343786b237bc92881f9a28ea688 (patch) | |
tree | 8fe312bb9f0805ed65e3017c4121049c6b57d832 /firmware/drivers/rtc | |
parent | 05f29f8d57b185ce1caa8c08afd44c35738bc6a7 (diff) |
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
Diffstat (limited to 'firmware/drivers/rtc')
-rw-r--r-- | firmware/drivers/rtc/rtc_e8564.c | 2 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_m41st84w.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/rtc/rtc_e8564.c b/firmware/drivers/rtc/rtc_e8564.c index 55c67c13c8..8b9f6bfa42 100644 --- a/firmware/drivers/rtc/rtc_e8564.c +++ b/firmware/drivers/rtc/rtc_e8564.c @@ -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; diff --git a/firmware/drivers/rtc/rtc_m41st84w.c b/firmware/drivers/rtc/rtc_m41st84w.c index eca61c7f0f..951091c6f2 100644 --- a/firmware/drivers/rtc/rtc_m41st84w.c +++ b/firmware/drivers/rtc/rtc_m41st84w.c @@ -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; |