/* Sets the RTC BCD calendar year value. 
The year value should only be the abbreviated year tens, meaning if 2021 is desired pass in only 21.  */
void rtc_calendar_set_year(uint8_t year)
/* Sets the RTC BCD calendar year value. 
The year value should only be the abbreviated year tens, meaning if 2021 is desired pass in only 21.  */
void rtc_calendar_set_year(uint8_t year)
{
	uint8_t bcd_year = _rtc_dec_to_bcd(year);
	RTC_DR &= ~(RTC_DR_YT_MASK << RTC_DR_YT_SHIFT | RTC_DR_YU_MASK << RTC_DR_YU_SHIFT);
	RTC_DR |= (((bcd_year >> 4) & RTC_DR_YT_MASK) << RTC_DR_YT_SHIFT) |
		((bcd_year & RTC_DR_YU_MASK) << RTC_DR_YU_SHIFT);
}