mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 15:26:47 +00:00
bugfix: 修复rtc时钟对BCD码进行转换的时候,忘了处理day字段的问题 (#104)
This commit is contained in:
parent
237e95c6dd
commit
728aca3089
@ -45,7 +45,7 @@ int rtc_get_cmos_time(struct rtc_time_t *t)
|
||||
t->second = (t->second & 0xf) + (t->second >> 4) * 10;
|
||||
t->minute = (t->minute & 0xf) + (t->minute >> 4) * 10;
|
||||
t->hour = ((t->hour & 0xf) + ((t->hour & 0x70) >> 4) * 10) | (t->hour & 0x80);
|
||||
|
||||
t->day = (t->day & 0xf) + ((t->day / 16) * 10);
|
||||
t->month = (t->month & 0xf) + (t->month >> 4) * 10;
|
||||
t->year = (t->year & 0xf) + (t->year >> 4) * 10;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user