rtcpsu
Vitis Drivers API Documentation
|
Data Structures | |
struct | XRtcPsu_Config |
This typedef contains configuration information for a device. More... | |
struct | XRtcPsu |
The XRtcPsu driver instance data. More... | |
struct | XRtcPsu_DT |
This typedef contains DateTime format structure. More... | |
Macros | |
#define | XRTC_H_ |
< prevent circular inclusions More... | |
#define | XRTCPSU_CRYSTAL_OSC_EN ((u32)1 << XRTC_CTL_OSC_SHIFT) |
Separate Mask for Crystal oscillator bit Enable. More... | |
#define | XRTC_CALIBRATION_VALUE 0x7FFFU |
Calibration value. More... | |
#define | XRTC_TYPICAL_OSC_FREQ 32768U |
Oscillator frequency. More... | |
#define | XRtcPsu_WriteSetTime(InstancePtr, Time) |
This macro updates the current time of RTC device. More... | |
#define | XRtcPsu_GetLastSetTime(InstancePtr) |
This macro returns the last set time of RTC device. More... | |
#define | XRtcPsu_GetCalibration(InstancePtr) XRtcPsu_ReadReg((InstancePtr)->RtcConfig.BaseAddr+XRTC_CALIB_RD_OFFSET) |
This macro returns the calibration value of RTC device. More... | |
#define | XRtcPsu_ReadCurrentTime(InstancePtr) XRtcPsu_ReadReg((InstancePtr)->RtcConfig.BaseAddr+XRTC_CUR_TIME_OFFSET) |
This macro returns the current time of RTC device. More... | |
#define | XRtcPsu_SetControlRegister(InstancePtr, Value) |
This macro sets the control register value of RTC device. More... | |
#define | XRtcPsu_GetSafetyCheck(InstancePtr) XRtcPsu_ReadReg((InstancePtr)->RtcConfig.BaseAddr+XRTC_SFTY_CHK_OFFSET) |
This macro returns the safety check register value of RTC device. More... | |
#define | XRtcPsu_SetSafetyCheck(InstancePtr, Value) |
This macro sets the safety check register value of RTC device. More... | |
#define | XRtcPsu_ResetAlarm(InstancePtr) |
This macro resets the alarm register. More... | |
#define | XRtcPsu_RoundOff(Number) |
This macro rounds off the given number. More... | |
Callback events | |
These constants specify the handler events that an application can handle using its specific handler function. Note that these constants are not bit mask, so only one event can be passed to an application at a time. | |
#define | XRTCPSU_EVENT_ALARM_GEN 1U |
Alarm generated event. More... | |
#define | XRTCPSU_EVENT_SECS_GEN 2U |
A new second generated event. More... | |
Typedefs | |
typedef void(* | XRtcPsu_Handler )(void *CallBackRef, u32 Event) |
This data type defines a handler that an application defines to communicate with interrupt system to retrieve state information about an application. More... | |
Functions | |
s32 | XRtcPsu_CfgInitialize (XRtcPsu *InstancePtr, XRtcPsu_Config *ConfigPtr, UINTPTR EffectiveAddr) |
This function initializes a XRtcPsu instance/driver. More... | |
void | XRtcPsu_SetAlarm (XRtcPsu *InstancePtr, u32 Alarm, u32 Periodic) |
This function sets the alarm value of RTC device. More... | |
void | XRtcPsu_SecToDateTime (u32 Seconds, XRtcPsu_DT *dt) |
This function translates time in seconds to a YEAR:MON:DAY HR:MIN:SEC format and saves it in the DT structure variable. More... | |
u32 | XRtcPsu_DateTimeToSec (XRtcPsu_DT *dt) |
This function translates time in YEAR:MON:DAY HR:MIN:SEC format to seconds. More... | |
void | XRtcPsu_CalculateCalibration (XRtcPsu *InstancePtr, u32 TimeReal, u32 CrystalOscFreq) |
This function calculates the calibration value depending on the actual realworld time and also helps in deriving new calibration value if the user wishes to change his oscillator frequency.TimeReal is generally the internet time with EPOCH time as reference i.e.,1/1/1970 1st second. More... | |
u32 | XRtcPsu_IsSecondsEventGenerated (XRtcPsu *InstancePtr) |
This function returns the seconds event status by reading interrupt status register. More... | |
u32 | XRtcPsu_IsAlarmEventGenerated (XRtcPsu *InstancePtr) |
This function returns the alarm event status by reading interrupt status register. More... | |
u32 | XRtcPsu_GetCurrentTime (XRtcPsu *InstancePtr) |
This function gets the current RTC time. More... | |
void | XRtcPsu_SetTime (XRtcPsu *InstancePtr, u32 Time) |
This function sets the RTC time by writing into rtc write register. More... | |
void | XRtcPsu_SetInterruptMask (XRtcPsu *InstancePtr, u32 Mask) |
This function sets the interrupt mask. More... | |
void | XRtcPsu_ClearInterruptMask (XRtcPsu *InstancePtr, u32 Mask) |
This function clears the interrupt mask. More... | |
void | XRtcPsu_InterruptHandler (XRtcPsu *InstancePtr) |
This function is the interrupt handler for the driver. More... | |
void | XRtcPsu_SetHandler (XRtcPsu *InstancePtr, XRtcPsu_Handler FunctionPtr, void *CallBackRef) |
This function sets the handler that will be called when an event (interrupt) occurs that needs application's attention. More... | |
s32 | XRtcPsu_SelfTest (XRtcPsu *InstancePtr) |
This function runs a self-test on the driver and hardware device. More... | |
XRtcPsu_Config * | XRtcPsu_LookupConfig (u16 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
Variables | |
XRtcPsu_Config | XRtcPsu_ConfigTable [] |
This table contains configuration information for RTC device in the system. More... | |