/* Interrupt handler for the RTC. Refresh the display.  */
void RTC_Handler(void)
/* Interrupt handler for the RTC. Refresh the display.  */
void RTC_Handler(void)
{
	uint32_t ul_status = rtc_get_status(RTC);
	if ((ul_status & RTC_SR_SEC) == RTC_SR_SEC) {
		rtc_disable_interrupt(RTC, RTC_IDR_SECDIS);
		refresh_display();
		rtc_clear_status(RTC, RTC_SCCR_SECCLR);
		rtc_enable_interrupt(RTC, RTC_IER_SECEN);
	} else {
		if ((ul_status & RTC_SR_ALARM) == RTC_SR_ALARM) {
			rtc_disable_interrupt(RTC, RTC_IDR_ALRDIS);
			gs_ul_alarm_triggered = 1;
			refresh_display();
			gs_ul_menu_shown = 0;
			rtc_clear_status(RTC, RTC_SCCR_ALRCLR);
			rtc_enable_interrupt(RTC, RTC_IER_ALREN);
		}
	}
}