Home
last modified time | relevance | path

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

/Zephyr-latest/drivers/rtc/
Drtc_ds1307.c90 timeptr->tm_sec = bcd2bin(regs[0] & SECONDS_BITS); in ds1307_get_time()
91 timeptr->tm_min = bcd2bin(regs[1] & MINUTES_BITS); in ds1307_get_time()
92 timeptr->tm_hour = bcd2bin(regs[2] & HOURS_BITS); /* 24hr mode */ in ds1307_get_time()
93 timeptr->tm_wday = bcd2bin(regs[3] & WEEKDAY_BITS); in ds1307_get_time()
94 timeptr->tm_mday = bcd2bin(regs[4] & DATE_BITS); in ds1307_get_time()
95 timeptr->tm_mon = bcd2bin(regs[5] & MONTHS_BITS); in ds1307_get_time()
96 timeptr->tm_year = bcd2bin(regs[6] & YEAR_BITS); in ds1307_get_time()
Drtc_pcf8563.c172 timeptr->tm_sec = bcd2bin(raw_time[0] & PCF8563_SECONDS_MASK); in pcf8563_get_time()
175 timeptr->tm_min = bcd2bin(raw_time[1] & PCF8563_MINUTES_MASK); in pcf8563_get_time()
178 timeptr->tm_hour = bcd2bin(raw_time[2] & PCF8563_HOURS_MASK); in pcf8563_get_time()
181 timeptr->tm_mday = bcd2bin(raw_time[3] & PCF8563_DAYS_MASK); in pcf8563_get_time()
187 timeptr->tm_mon = bcd2bin(raw_time[5] & PCF8563_MONTHS_MASK); in pcf8563_get_time()
190 timeptr->tm_year = bcd2bin(raw_time[6]); in pcf8563_get_time()
312 timeptr->tm_min = bcd2bin(regs[0] & GENMASK(6, 0)); in pcf8563_alarm_get_time()
317 timeptr->tm_hour = bcd2bin(regs[1] & GENMASK(5, 0)); in pcf8563_alarm_get_time()
322 timeptr->tm_mday = bcd2bin(regs[2] & GENMASK(5, 0)); in pcf8563_alarm_get_time()
327 timeptr->tm_wday = bcd2bin(regs[3] & GENMASK(2, 0)); in pcf8563_alarm_get_time()
Drtc_am1805.c188 timeptr->tm_sec = bcd2bin(regs[0] & SECONDS_BITS); in am1805_get_time()
189 timeptr->tm_min = bcd2bin(regs[1] & MINUTES_BITS); in am1805_get_time()
190 timeptr->tm_hour = bcd2bin(regs[2] & HOURS_BITS); in am1805_get_time()
191 timeptr->tm_mday = bcd2bin(regs[3] & DATE_BITS); in am1805_get_time()
192 timeptr->tm_mon = bcd2bin(regs[4] & MONTHS_BITS); in am1805_get_time()
193 timeptr->tm_year = bcd2bin(regs[5] & YEAR_BITS); in am1805_get_time()
194 timeptr->tm_wday = bcd2bin(regs[6] & WEEKDAY_BITS); in am1805_get_time()
341 timeptr->tm_sec = bcd2bin(regs[0] & SECONDS_BITS); in am1805_alarm_get_time()
342 timeptr->tm_min = bcd2bin(regs[1] & MINUTES_BITS); in am1805_alarm_get_time()
343 timeptr->tm_hour = bcd2bin(regs[2] & HOURS_BITS); in am1805_alarm_get_time()
[all …]
Drtc_sam.c167 timeptr->tm_sec = bcd2bin(RTC_SAM_REG_GET_FIELD(timr0, TIMR_SEC)); in rtc_sam_get_time()
168 timeptr->tm_min = bcd2bin(RTC_SAM_REG_GET_FIELD(timr0, TIMR_MIN)); in rtc_sam_get_time()
169 timeptr->tm_hour = bcd2bin(RTC_SAM_REG_GET_FIELD(timr0, TIMR_HOUR)); in rtc_sam_get_time()
170 timeptr->tm_mday = bcd2bin(RTC_SAM_REG_GET_FIELD(calr0, CALR_DATE)); in rtc_sam_get_time()
171 timeptr->tm_mon = bcd2bin(RTC_SAM_REG_GET_FIELD(calr0, CALR_MONTH)) - 1; in rtc_sam_get_time()
173 timeptr->tm_year = bcd2bin(RTC_SAM_REG_GET_FIELD(calr0, CALR_YEAR)); in rtc_sam_get_time()
174 timeptr->tm_year += ((int)bcd2bin(RTC_SAM_REG_GET_FIELD(calr0, CALR_CENT))) * 100; in rtc_sam_get_time()
177 timeptr->tm_wday = bcd2bin(RTC_SAM_REG_GET_FIELD(calr0, CALR_DAY)) - 1; in rtc_sam_get_time()
307 timeptr->tm_sec = bcd2bin(RTC_SAM_REG_GET_FIELD(timalr, TIMALR_SEC)); in rtc_sam_tm_from_timalr_calalr()
311 timeptr->tm_min = bcd2bin(RTC_SAM_REG_GET_FIELD(timalr, TIMALR_MIN)); in rtc_sam_tm_from_timalr_calalr()
[all …]
Drtc_smartbond.c189 timeptr->tm_sec = bcd2bin(RTC_TIME_REG_GET_FIELD(S, rtc_time_reg)); in bcd_to_rtc_time()
190 timeptr->tm_min = bcd2bin(RTC_TIME_REG_GET_FIELD(M, rtc_time_reg)); in bcd_to_rtc_time()
191 timeptr->tm_hour = bcd2bin(RTC_TIME_REG_GET_FIELD(HR, rtc_time_reg)); in bcd_to_rtc_time()
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()
202 timeptr->tm_year = bcd2bin(RTC_CALENDAR_REG_GET_FIELD(Y, rtc_calendar_reg)) + in bcd_to_rtc_calendar()
203 (bcd2bin(RTC_CALENDAR_REG_GET_FIELD(C, rtc_calendar_reg)) * 100) - TM_YEAR_REF; in bcd_to_rtc_calendar()
340 timeptr->tm_mday = bcd2bin(RTC_CALENDAR_ALARM_REG_GET_FIELD(D, rtc_calendar_alarm_reg)); in bcd_to_alarm_calendar()
341 timeptr->tm_mon = bcd2bin(RTC_CALENDAR_ALARM_REG_GET_FIELD(M, rtc_calendar_alarm_reg)) - 1; in bcd_to_alarm_calendar()
350 timeptr->tm_sec = bcd2bin(RTC_TIME_ALARM_REG_GET_FIELD(S, rtc_time_alarm_reg)); in bcd_to_alarm_time()
[all …]
Drtc_rv8263.c249 timeptr->tm_sec = bcd2bin(regs[0] & SECONDS_BITS); in rv8263c8_time_get()
250 timeptr->tm_min = bcd2bin(regs[1] & MINUTES_BITS); in rv8263c8_time_get()
251 timeptr->tm_hour = bcd2bin(regs[2] & HOURS_BITS); in rv8263c8_time_get()
252 timeptr->tm_mday = bcd2bin(regs[3] & DATE_BITS); in rv8263c8_time_get()
253 timeptr->tm_wday = bcd2bin(regs[4] & WEEKDAY_BITS); in rv8263c8_time_get()
254 timeptr->tm_mon = bcd2bin(regs[5] & MONTHS_BITS) - 1; in rv8263c8_time_get()
255 timeptr->tm_year = bcd2bin(regs[6] & YEAR_BITS) + RV8263_YEAR_OFFSET; in rv8263c8_time_get()
494 timeptr->tm_sec = bcd2bin(value[0]) & SECONDS_BITS; in rv8263c8_alarm_get_time()
499 timeptr->tm_min = bcd2bin(value[1]) & MINUTES_BITS; in rv8263c8_alarm_get_time()
504 timeptr->tm_hour = bcd2bin(value[2]) & HOURS_BITS; in rv8263c8_alarm_get_time()
[all …]
Drtc_ll_stm32.c525 timeptr->tm_year = bcd2bin(__LL_RTC_GET_YEAR(rtc_date)) + (RTC_YEAR_REF - TM_YEAR_REF); in rtc_stm32_get_time()
527 timeptr->tm_mon = bcd2bin(__LL_RTC_GET_MONTH(rtc_date)) - 1; in rtc_stm32_get_time()
528 timeptr->tm_mday = bcd2bin(__LL_RTC_GET_DAY(rtc_date)); in rtc_stm32_get_time()
540 timeptr->tm_hour = bcd2bin(__LL_RTC_GET_HOUR(rtc_time)); in rtc_stm32_get_time()
541 timeptr->tm_min = bcd2bin(__LL_RTC_GET_MINUTE(rtc_time)); in rtc_stm32_get_time()
542 timeptr->tm_sec = bcd2bin(__LL_RTC_GET_SECOND(rtc_time)); in rtc_stm32_get_time()
624 timeptr->tm_sec = bcd2bin(LL_RTC_ALMA_GetSecond(RTC)); in rtc_stm32_get_ll_alrm_time()
625 timeptr->tm_min = bcd2bin(LL_RTC_ALMA_GetMinute(RTC)); in rtc_stm32_get_ll_alrm_time()
626 timeptr->tm_hour = bcd2bin(LL_RTC_ALMA_GetHour(RTC)); in rtc_stm32_get_ll_alrm_time()
627 timeptr->tm_wday = bcd2bin(LL_RTC_ALMA_GetWeekDay(RTC)); in rtc_stm32_get_ll_alrm_time()
[all …]
Drtc_pcf8523.c417 timeptr->tm_sec = bcd2bin(regs[3] & PCF8523_SECONDS_MASK); in pcf8523_get_time()
418 timeptr->tm_min = bcd2bin(regs[4] & PCF8523_MINUTES_MASK); in pcf8523_get_time()
419 timeptr->tm_hour = bcd2bin(regs[5] & PCF8523_HOURS_24H_MASK); in pcf8523_get_time()
420 timeptr->tm_mday = bcd2bin(regs[6] & PCF8523_DAYS_MASK); in pcf8523_get_time()
421 timeptr->tm_wday = bcd2bin(regs[7] & PCF8523_WEEKDAYS_MASK); in pcf8523_get_time()
422 timeptr->tm_mon = bcd2bin(regs[8] & PCF8523_MONTHS_MASK) - PCF8523_MONTHS_OFFSET; in pcf8523_get_time()
423 timeptr->tm_year = bcd2bin(regs[9] & PCF8523_YEARS_MASK) + PCF8523_YEARS_OFFSET; in pcf8523_get_time()
518 timeptr->tm_min = bcd2bin(regs[0] & PCF8523_MINUTE_ALARM_MASK); in pcf8523_alarm_get_time()
523 timeptr->tm_hour = bcd2bin(regs[1] & PCF8523_HOUR_ALARM_24H_MASK); in pcf8523_alarm_get_time()
528 timeptr->tm_mday = bcd2bin(regs[2] & PCF8523_DAY_ALARM_MASK); in pcf8523_alarm_get_time()
[all …]
Drtc_rv3028.c526 timeptr->tm_sec = bcd2bin(date[0] & RV3028_SECONDS_MASK); in rv3028_get_time()
527 timeptr->tm_min = bcd2bin(date[1] & RV3028_MINUTES_MASK); in rv3028_get_time()
528 timeptr->tm_hour = bcd2bin(date[2] & RV3028_HOURS_24H_MASK); in rv3028_get_time()
530 timeptr->tm_mday = bcd2bin(date[4] & RV3028_DATE_MASK); in rv3028_get_time()
531 timeptr->tm_mon = bcd2bin(date[5] & RV3028_MONTH_MASK) - RV3028_MONTH_OFFSET; in rv3028_get_time()
532 timeptr->tm_year = bcd2bin(date[6] & RV3028_YEAR_MASK) + RV3028_YEAR_OFFSET; in rv3028_get_time()
626 timeptr->tm_min = bcd2bin(regs[0] & RV3028_ALARM_MINUTES_MASK); in rv3028_alarm_get_time()
631 timeptr->tm_hour = bcd2bin(regs[1] & RV3028_ALARM_HOURS_24H_MASK); in rv3028_alarm_get_time()
636 timeptr->tm_mday = bcd2bin(regs[2] & RV3028_ALARM_DATE_MASK); in rv3028_alarm_get_time()
/Zephyr-latest/drivers/counter/
Dmaxim_ds3231.c300 tp->tm_sec = bcd2bin(reg & 0x7F); in decode_time()
304 tp->tm_min = bcd2bin(reg & 0x7F); in decode_time()
352 tm.tm_mday = bcd2bin(*dp & 0x3F); in decode_alarm()
434 tm.tm_mday = bcd2bin(rp->dom & 0x3F); in decode_rtc()
437 tm.tm_year = bcd2bin(rp->year); in decode_rtc()
/Zephyr-latest/include/zephyr/sys/
Dutil.h585 static inline uint8_t bcd2bin(uint8_t bcd) in bcd2bin() function