/* Enables or disables the RTC day over threshold interrupt.  */
u32 RTC_DayIntCmd(u32 NewState)
/* Enables or disables the RTC day over threshold interrupt.  */
u32 RTC_DayIntCmd(u32 NewState)
{
	RTC_TypeDef* RTC = ((RTC_TypeDef *) RTC_BASE);
	u32 status = 0;
	RTC->WPR = 0xCA;
	RTC->WPR = 0x53;
	if (RTC_EnterInitMode()) {
		RTC_DayIntClear();
		if (NewState != DISABLE) {
			RTC->CR |= (u32)(RTC_CR_DOVTHIE);
		} else {
			RTC->CR &= (u32)~(RTC_CR_DOVTHIE);
		}
		RTC_ExitInitMode();
		if (RTC_WaitForSynchro()) {
			status = 1;
		} else {
			status = 0;
		}
	} else {
		status = 0;
	}
	RTC->WPR = 0xFF;
	return status;
}