Fixed the conversion to BCD in nvr_at.c, the month of October is no longer written the wrong way in the NVRAM;
Changed the variables in the day of week calculation function in nvr.c from signed to unsigned, fixes the day of week calculation for dates in the previous century.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implement a generic NVRAM/CMOS/RTC device.
|
||||
*
|
||||
* Version: @(#)nvr.c 1.0.6 2018/04/11
|
||||
* Version: @(#)nvr.c 1.0.7 2018/04/29
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -308,8 +308,8 @@ nvr_period_recalc(void)
|
||||
void
|
||||
nvr_time_get(struct tm *tm)
|
||||
{
|
||||
int8_t dom, mon, sum, wd;
|
||||
int16_t cent, yr;
|
||||
uint8_t dom, mon, sum, wd;
|
||||
uint16_t cent, yr;
|
||||
|
||||
tm->tm_sec = intclk.tm_sec;
|
||||
tm->tm_min = intclk.tm_min;
|
||||
|
||||
Reference in New Issue
Block a user