Home
last modified time | relevance | path

Searched refs:rtc_calendar_reg (Results 1 – 1 of 1) sorted by relevance

/Zephyr-latest/drivers/rtc/
Drtc_smartbond.c168 uint32_t rtc_calendar_reg = 0; in rtc_calendar_to_bcd() local
170 RTC_CALENDAR_REG_SET_FIELD(D, rtc_calendar_reg, bin2bcd(timeptr->tm_mday)); /*[1, 31]*/ in rtc_calendar_to_bcd()
171 RTC_CALENDAR_REG_SET_FIELD(Y, rtc_calendar_reg, in rtc_calendar_to_bcd()
173 RTC_CALENDAR_REG_SET_FIELD(C, rtc_calendar_reg, in rtc_calendar_to_bcd()
175 RTC_CALENDAR_REG_SET_FIELD(M, rtc_calendar_reg, bin2bcd(timeptr->tm_mon + 1)); /*[0, 11]*/ in rtc_calendar_to_bcd()
178 rtc_calendar_reg |= ((timeptr->tm_wday + 1) & in rtc_calendar_to_bcd()
182 return rtc_calendar_reg; in rtc_calendar_to_bcd()
198 uint32_t rtc_calendar_reg = RTC->RTC_CALENDAR_REG; in bcd_to_rtc_calendar() local
200 timeptr->tm_mday = bcd2bin(RTC_CALENDAR_REG_GET_FIELD(D, rtc_calendar_reg)); in bcd_to_rtc_calendar()
201 timeptr->tm_mon = bcd2bin(RTC_CALENDAR_REG_GET_FIELD(M, rtc_calendar_reg)) - 1; in bcd_to_rtc_calendar()
[all …]