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:
parent
aee58ef956
commit
dca5fd1064
2 changed files with 2 additions and 1 deletions
|
@ -504,6 +504,7 @@ Christophe Nicolas
|
||||||
Yann Muller
|
Yann Muller
|
||||||
Sascha Wilde
|
Sascha Wilde
|
||||||
Fred Bauer
|
Fred Bauer
|
||||||
|
Simon Rothen
|
||||||
|
|
||||||
The libmad team
|
The libmad team
|
||||||
The wavpack team
|
The wavpack team
|
||||||
|
|
|
@ -126,7 +126,7 @@ int rtc_read_datetime(struct tm *tm)
|
||||||
tm->tm_sec = BCD2DEC(buf[0] & 0x7f);
|
tm->tm_sec = BCD2DEC(buf[0] & 0x7f);
|
||||||
tm->tm_min = BCD2DEC(buf[1] & 0x7f);
|
tm->tm_min = BCD2DEC(buf[1] & 0x7f);
|
||||||
tm->tm_hour = BCD2DEC(buf[2] & 0x3f);
|
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_mday = BCD2DEC(buf[4] & 0x3f);
|
||||||
tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1;
|
tm->tm_mon = BCD2DEC(buf[5] & 0x1f) - 1;
|
||||||
tm->tm_year = BCD2DEC(buf[6]) + 100;
|
tm->tm_year = BCD2DEC(buf[6]) + 100;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue