/* Sets the RTC BCD calendar weekday. 
Requires unlocking the RTC write-protection (RTC_WPR)  */
void rtc_calendar_set_weekday(enum rtc_weekday rtc_dr_wdu)
/* Sets the RTC BCD calendar weekday. 
Requires unlocking the RTC write-protection (RTC_WPR)  */
void rtc_calendar_set_weekday(enum rtc_weekday rtc_dr_wdu)
{
	RTC_DR &= ~(RTC_DR_WDU_MASK << RTC_DR_WDU_SHIFT);
	RTC_DR |= (rtc_dr_wdu << RTC_DR_WDU_SHIFT);
}