RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches
rtc.h File Reference
#include "i2c/i2c.h"
#include "rtc/rtc_config.h"

Go to the source code of this file.

Overview

RTC driver API definitions.

Author
Efinix Inc

This file provides data structures and APIs for controlling the RTC peripheral on the EfxSapphireSoC platform.

Definition in file rtc.h.

Data Structures

struct  rtc_data_t
 RTC time data structure. More...
struct  rtc_api_t
 RTC API structure. More...
struct  rtc_instance
 RTC instance structure. More...

Typedefs

typedef struct rtc_instance rtc_instance_t
 Forward declaration of RTC instance.

Enumerations

Callback Enums

Enums used for driver callback handling.

Note
Used to indicate success or failure of RTC operations.
enum  rtc_status_t { RTC_OK = 0 , RTC_ERR = 1 , RTC_USER_ERR = 2 , RTC_SKIP = 3 }
 RTC Status List. More...

Functions

rtc_status_t rtc_applyConfig (rtc_instance_t *rtc)
 Wrapper: Apply I2C + RTC configuration.
rtc_status_t rtc_enableErrorInterrupt (rtc_instance_t *rtc)
 Wrapper: Enable RTC error interrupt.
u8 convert_hour_register (u8 old_reg_val, u8 to_12h)
 Convert hour register between 12-hour and 24-hour format.
RTC (Internal Functions)

Helper function.

RTC (Public API - String Based Functions)

Helper function.

const char * Day_ordinal []
 Get ordinal suffix for a given day.
const char *const DayStrings []
 Get string representations for Sunday,Monday ,etc..
const char *const MonthStrings []
 Get string representations for months.
const char *const meridiem []
 Get string representations for meridiem (AM/PM).
const char * get_ordinal (u8 day)
 Get ordinal suffix for a given day.