summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kukla <roolku@rockbox.org>2009-11-05 09:10:03 +0000
committerRobert Kukla <roolku@rockbox.org>2009-11-05 09:10:03 +0000
commitdca5fd106496960c24c1b341ff45f3f1d358350c (patch)
treeb4db312633a75abc57767a88e29d3efdeb898b0a
parentaee58ef956e69428ec8de7c956224849a453a02e (diff)
downloadrockbox-dca5fd106496960c24c1b341ff45f3f1d358350c.tar.gz
rockbox-dca5fd106496960c24c1b341ff45f3f1d358350c.zip
RTC read of ds1339 of ds3231 weekday
Flyspray: FS #10760 Author: Simon Rothen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23531 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--docs/CREDITS1
-rw-r--r--firmware/drivers/rtc/rtc_ds1339_ds3231.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/CREDITS b/docs/CREDITS
index e8fb6a6a11..92e326fccd 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -504,6 +504,7 @@ Christophe Nicolas
504Yann Muller 504Yann Muller
505Sascha Wilde 505Sascha Wilde
506Fred Bauer 506Fred Bauer
507Simon Rothen
507 508
508The libmad team 509The libmad team
509The wavpack team 510The wavpack team
diff --git a/firmware/drivers/rtc/rtc_ds1339_ds3231.c b/firmware/drivers/rtc/rtc_ds1339_ds3231.c
index 3788dc75c0..01624e048b 100644
--- a/firmware/drivers/rtc/rtc_ds1339_ds3231.c
+++ b/firmware/drivers/rtc/rtc_ds1339_ds3231.c
@@ -126,7 +126,7 @@ int rtc_read_datetime(struct tm *tm)
126 tm->tm_sec = BCD2DEC(buf[0] & 0x7f); 126 tm->tm_sec = BCD2DEC(buf[0] & 0x7f);
127 tm->tm_min = BCD2DEC(buf[1] & 0x7f); 127 tm->tm_min = BCD2DEC(buf[1] & 0x7f);
128 tm->tm_hour = BCD2DEC(buf[2] & 0x3f); 128 tm->tm_hour = BCD2DEC(buf[2] & 0x3f);
129 tm->tm_wday = BCD2DEC(buf[3] & 0x3) - 1; /* timefuncs wants 0..6 for wday */ 129 tm->tm_wday = BCD2DEC(buf[3] & 0x7) - 1; /* timefuncs wants 0..6 for wday */
130 tm->tm_mday = BCD2DEC(buf[4] & 0x3f); 130 tm->tm_mday = BCD2DEC(buf[4] & 0x3f);
131 tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1; 131 tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1;
132 tm->tm_year = BCD2DEC(buf[6]) + 100; 132 tm->tm_year = BCD2DEC(buf[6]) + 100;