zephyr/drivers/rtc
Christopher Friedt c8e0022d4b drivers: rtc: mc146818: fix y2k bug
That's correct. We are still fixing the Y2K bug in 2023 \o/

* write century to RAM register 0x32
* ensure year register is in [0,99] (inclusive)

Aside from that, there were a few other errors in the driver.

* translate epoch-centric RTC API year to begin at 1900
* fix off-by-one error with month limit
* fix off-by-one error with wday
* fix off-by-one-hundred error with year limit
* adjust timeptr values in rtc_mc146818_validate_time()
* adjust timeptr values in rtc_mc146818_validate_alarm()

With the above, the testsuite passes!

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-20 15:14:08 +02:00
..
CMakeLists.txt drivers: syscalls: use zephyr_syscall_header 2023-06-17 07:57:45 -04:00
Kconfig drivers: rtc: rtc_mc146818: Added RTC driver for Motorola MC146818B 2023-04-27 14:15:22 +02:00
Kconfig.emul boards/posix/native_posix: Add emulated RTC device driver 2023-04-04 17:03:38 +02:00
Kconfig.mc146818 drivers: rtc: rtc_mc146818: Added RTC driver for Motorola MC146818B 2023-04-27 14:15:22 +02:00
Kconfig.pcf8523 drivers: rtc: add driver for the nxp pcf8523 rtc 2023-04-27 09:51:42 +02:00
rtc_emul.c drivers: rtc: allow configuring the RTC initialization priority 2023-04-27 09:51:42 +02:00
rtc_handlers.c
rtc_mc146818.c drivers: rtc: mc146818: fix y2k bug 2023-06-20 15:14:08 +02:00
rtc_pcf8523.c drivers: rtc: add driver for the nxp pcf8523 rtc 2023-04-27 09:51:42 +02:00