/* Sets the RTC BCD time minute value. 
Requires unlocking the RTC write-protection (RTC_WPR)  */
void rtc_time_set_minute(uint8_t minute)
/* Sets the RTC BCD time minute value. 
Requires unlocking the RTC write-protection (RTC_WPR)  */
void rtc_time_set_minute(uint8_t minute)
{
	uint8_t bcd_minute = _rtc_dec_to_bcd(minute);
	RTC_TR &= ~(RTC_TR_MNT_MASK << RTC_TR_MNT_SHIFT | RTC_TR_MNU_MASK << RTC_TR_MNU_SHIFT);
	RTC_TR |= (((bcd_minute >> 4) & RTC_TR_MNT_MASK) << RTC_TR_MNT_SHIFT) |
		((bcd_minute & RTC_TR_MNU_MASK) << RTC_TR_MNU_SHIFT);
}