/* Configure RTC in calendar mode. 
This function configures the RTC in calendar mode with alarm enabled  */
void configure_rtc_calendar(void)
/* Configure RTC in calendar mode. 
This function configures the RTC in calendar mode with alarm enabled  */
void configure_rtc_calendar(void)
{
	struct rtc_calendar_config config_rtc_calendar;
	rtc_calendar_get_config_defaults(&config_rtc_calendar);
	config_rtc_calendar.clock_24h = false;
	config_rtc_calendar.alarm[0].time = alarm.time;
	config_rtc_calendar.alarm[0].mask = RTC_CALENDAR_ALARM_MASK_YEAR;
	rtc_calendar_init(&rtc_instance, RTC, &config_rtc_calendar);
	rtc_calendar_enable(&rtc_instance);
}