hw/ds1338.c: Correct bug in conversion to BCD.
Signed-off-by: Antoine Mathys <barsamin@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
97331270e5
commit
580f5c0008
@ -57,9 +57,9 @@ static void capture_current_time(DS1338State *s)
|
||||
} else {
|
||||
s->nvram[2] = to_bcd(now.tm_hour);
|
||||
}
|
||||
s->nvram[3] = to_bcd(now.tm_wday) + 1;
|
||||
s->nvram[3] = to_bcd(now.tm_wday + 1);
|
||||
s->nvram[4] = to_bcd(now.tm_mday);
|
||||
s->nvram[5] = to_bcd(now.tm_mon) + 1;
|
||||
s->nvram[5] = to_bcd(now.tm_mon + 1);
|
||||
s->nvram[6] = to_bcd(now.tm_year - 100);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user