70 if (day >= 11 && day <= 13)
return "th";
104 h = bcd2bin(old_reg_val & 0x3F);
115 new_reg_val = bin2bcd(h) | (pm_flag << 5);
120 pm_flag = (old_reg_val & 0x20) >> 5;
121 h = bcd2bin(old_reg_val & 0x1F);
131 new_reg_val = bin2bcd(h);
rtc_status_t
RTC Status List.
@ RTC_ERR
Failed to retrieve/write value.
const char *const DayStrings[]
Get string representations for Sunday,Monday ,etc..
rtc_status_t rtc_enableErrorInterrupt(rtc_instance_t *rtc)
Wrapper: Enable RTC error interrupt.
const char *const meridiem[]
Get string representations for meridiem (AM/PM).
u8 convert_hour_register(u8 old_reg_val, u8 to_12h)
Convert hour register between 12-hour and 24-hour format.
const char * get_ordinal(u8 day)
Get ordinal suffix for a given day.
const char *const MonthStrings[]
Get string representations for months.
rtc_status_t rtc_applyConfig(rtc_instance_t *rtc)
Wrapper: Apply I2C + RTC configuration.
const char * Day_ordinal[]
Get ordinal suffix for a given day.
struct rtc_instance rtc_instance_t
Forward declaration of RTC instance.
RTC driver API definitions.
rtc_status_t(* applyConfig)(rtc_instance_t *rtc)
Apply i2c config , user can call via rtc_applyConfig as well.
rtc_status_t(* enableErrorInterrupt)(rtc_instance_t *rtc)
Enable error interrupt function pointer, user can call via rtc_enableErrorInterrupt as well.
const rtc_api_t * drv
Pointer to RTC API structure.