Lines Matching refs:mask

228 static uint32_t rtc_atmel_timalr_from_tm(const struct rtc_time *timeptr, uint32_t mask)  in rtc_atmel_timalr_from_tm()  argument
232 if (mask & RTC_ALARM_TIME_MASK_SECOND) { in rtc_atmel_timalr_from_tm()
237 if (mask & RTC_ALARM_TIME_MASK_MINUTE) { in rtc_atmel_timalr_from_tm()
242 if (mask & RTC_ALARM_TIME_MASK_HOUR) { in rtc_atmel_timalr_from_tm()
250 static uint32_t rtc_atmel_calalr_from_tm(const struct rtc_time *timeptr, uint32_t mask) in rtc_atmel_calalr_from_tm() argument
254 if (mask & RTC_ALARM_TIME_MASK_MONTH) { in rtc_atmel_calalr_from_tm()
259 if (mask & RTC_ALARM_TIME_MASK_MONTHDAY) { in rtc_atmel_calalr_from_tm()
269 uint32_t mask = 0; in rtc_sam_alarm_mask_from_timalr() local
272 mask |= RTC_ALARM_TIME_MASK_SECOND; in rtc_sam_alarm_mask_from_timalr()
276 mask |= RTC_ALARM_TIME_MASK_MINUTE; in rtc_sam_alarm_mask_from_timalr()
280 mask |= RTC_ALARM_TIME_MASK_HOUR; in rtc_sam_alarm_mask_from_timalr()
283 return mask; in rtc_sam_alarm_mask_from_timalr()
288 uint32_t mask = 0; in rtc_sam_alarm_mask_from_calalr() local
291 mask |= RTC_ALARM_TIME_MASK_MONTH; in rtc_sam_alarm_mask_from_calalr()
295 mask |= RTC_ALARM_TIME_MASK_MONTHDAY; in rtc_sam_alarm_mask_from_calalr()
298 return mask; in rtc_sam_alarm_mask_from_calalr()
301 static void rtc_sam_tm_from_timalr_calalr(struct rtc_time *timeptr, uint32_t mask, in rtc_sam_tm_from_timalr_calalr() argument
306 if (mask & RTC_ALARM_TIME_MASK_SECOND) { in rtc_sam_tm_from_timalr_calalr()
310 if (mask & RTC_ALARM_TIME_MASK_MINUTE) { in rtc_sam_tm_from_timalr_calalr()
314 if (mask & RTC_ALARM_TIME_MASK_HOUR) { in rtc_sam_tm_from_timalr_calalr()
318 if (mask & RTC_ALARM_TIME_MASK_MONTHDAY) { in rtc_sam_tm_from_timalr_calalr()
322 if (mask & RTC_ALARM_TIME_MASK_MONTH) { in rtc_sam_tm_from_timalr_calalr()
328 uint16_t *mask) in rtc_sam_alarm_get_supported_fields() argument
333 *mask = rtc_sam_alarm_get_supported_mask(); in rtc_sam_alarm_get_supported_fields()
337 static int rtc_sam_alarm_set_time(const struct device *dev, uint16_t id, uint16_t mask, in rtc_sam_alarm_set_time() argument
354 if ((mask > 0) && (timeptr == NULL)) { in rtc_sam_alarm_set_time()
358 if (mask & ~mask_supported) { in rtc_sam_alarm_set_time()
362 if (rtc_utils_validate_rtc_time(timeptr, mask) == false) { in rtc_sam_alarm_set_time()
366 timalr = rtc_atmel_timalr_from_tm(timeptr, mask); in rtc_sam_alarm_set_time()
367 calalr = rtc_atmel_calalr_from_tm(timeptr, mask); in rtc_sam_alarm_set_time()
388 static int rtc_sam_alarm_get_time(const struct device *dev, uint16_t id, uint16_t *mask, in rtc_sam_alarm_get_time() argument
398 if ((id != 0) || (mask == NULL) || (timeptr == NULL)) { in rtc_sam_alarm_get_time()
409 *mask = rtc_sam_alarm_mask_from_timalr(timalr); 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()