Lines Matching refs:calalr
252 uint32_t calalr = RTC_CALALR_MONTH(1) | RTC_CALALR_DATE(1); in rtc_atmel_calalr_from_tm() local
255 calalr |= RTC_CALALR_MTHEN; in rtc_atmel_calalr_from_tm()
256 calalr |= RTC_CALALR_MONTH(bin2bcd(timeptr->tm_mon + 1)); in rtc_atmel_calalr_from_tm()
260 calalr |= RTC_CALALR_DATEEN; in rtc_atmel_calalr_from_tm()
261 calalr |= RTC_CALALR_DATE(bin2bcd(timeptr->tm_mday)); in rtc_atmel_calalr_from_tm()
264 return calalr; in rtc_atmel_calalr_from_tm()
286 static uint32_t rtc_sam_alarm_mask_from_calalr(uint32_t calalr) in rtc_sam_alarm_mask_from_calalr() argument
290 if (calalr & RTC_CALALR_MTHEN) { in rtc_sam_alarm_mask_from_calalr()
294 if (calalr & RTC_CALALR_DATEEN) { in rtc_sam_alarm_mask_from_calalr()
302 uint32_t timalr, uint32_t calalr) in rtc_sam_tm_from_timalr_calalr() argument
319 timeptr->tm_mday = bcd2bin(RTC_SAM_REG_GET_FIELD(calalr, CALALR_DATE)); in rtc_sam_tm_from_timalr_calalr()
323 timeptr->tm_mon = bcd2bin(RTC_SAM_REG_GET_FIELD(calalr, CALALR_MONTH)) - 1; in rtc_sam_tm_from_timalr_calalr()
345 uint32_t calalr; in rtc_sam_alarm_set_time() local
367 calalr = rtc_atmel_calalr_from_tm(timeptr, mask); in rtc_sam_alarm_set_time()
376 regs->RTC_CALALR = calalr; in rtc_sam_alarm_set_time()
396 uint32_t calalr; in rtc_sam_alarm_get_time() local
405 calalr = regs->RTC_CALALR; in rtc_sam_alarm_get_time()
410 *mask |= rtc_sam_alarm_mask_from_calalr(calalr); in rtc_sam_alarm_get_time()
412 rtc_sam_tm_from_timalr_calalr(timeptr, *mask, timalr, calalr); in rtc_sam_alarm_get_time()