Lines Matching refs:hour
42 static uint8_t rtc5t619_12hour_bcd2bin(uint8_t hour) in rtc5t619_12hour_bcd2bin() argument
44 if (hour & HOUR_PMFLAG) { in rtc5t619_12hour_bcd2bin()
45 hour = bcd2bin(hour & ~HOUR_PMFLAG); in rtc5t619_12hour_bcd2bin()
46 return hour == 12 ? 12 : 12 + hour; in rtc5t619_12hour_bcd2bin()
49 hour = bcd2bin(hour); in rtc5t619_12hour_bcd2bin()
50 return hour == 12 ? 0 : hour; in rtc5t619_12hour_bcd2bin()
53 static uint8_t rtc5t619_12hour_bin2bcd(uint8_t hour) in rtc5t619_12hour_bin2bcd() argument
55 if (!hour) in rtc5t619_12hour_bin2bcd()
58 if (hour < 12) in rtc5t619_12hour_bin2bcd()
59 return bin2bcd(hour); in rtc5t619_12hour_bin2bcd()
61 if (hour == 12) in rtc5t619_12hour_bin2bcd()
64 return bin2bcd(hour - 12) | HOUR_PMFLAG; in rtc5t619_12hour_bin2bcd()