David-OConnor / stm32-hal

This library provides access to STM32 peripherals in Rust.
MIT License
147 stars 44 forks source link

[modif] RTC : Adapt get_year() according to set_date and set_year function with 2000 year offset #72

Closed yann77500 closed 1 year ago

yann77500 commented 1 year ago

I don't know why there is not millennium bit into RTC, maybe ST doesn't allow used MCU with date before year 2000. Into function set_year and set_date Year is decremented by 2000, but not incremented by 2000 into get_year. Offset of 2000 year is added in get_date to obtain timestamp expected

David-OConnor commented 1 year ago

Solid