1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Robert Kukla 2009-11-05 09:10:03 +00:00
parent aee58ef956
commit dca5fd1064
2 changed files with 2 additions and 1 deletions

View file

@ -504,6 +504,7 @@ Christophe Nicolas
Yann Muller
Sascha Wilde
Fred Bauer
Simon Rothen
The libmad team
The wavpack team

View file

@ -126,7 +126,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) - 1; /* timefuncs wants 0..6 for wday */
tm->tm_wday = BCD2DEC(buf[3] & 0x7) - 1; /* timefuncs wants 0..6 for wday */
tm->tm_mday = BCD2DEC(buf[4] & 0x3f);
tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1;
tm->tm_year = BCD2DEC(buf[6]) + 100;