Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
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

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.