![]() |
rtcpsu
Xilinx SDK Drivers API Documentation
|
This file contains an alarm example using the XRtcPsu driver in interrupt mode.
It sets alarm for a specified time from the current time.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 kvn 05/12/15 First Release ms 04/10/17 Modified filename tag to include the file in doxygen examples.
Functions | |
int | RtcPsuAlarmIntrExample (XScuGic *IntcInstPtr, XRtcPsu *RtcInstPtr, u16 DeviceId, u16 RtcIntrId) |
This function does a minimal test on the Rtc device and driver as a design example. More... | |
void | Handler (void *CallBackRef, u32 Event) |
This function is the handler which performs processing to handle interrupt events from the device. More... | |
int | main (void) |
Main function to call the RTC Alarm interrupt example. More... | |
void Handler | ( | void * | CallBackRef, |
u32 | Event | ||
) |
This function is the handler which performs processing to handle interrupt events from the device.
It is called from an interrupt context. so the amount of processing should be minimal.
This handler provides an example of how to handle interrupt data for the device and is application specific.
CallBackRef | contains a callback reference from the driver, in this case it is the instance pointer for the XRtcPsu driver. |
Event | contains the specific kind of event that has occurred. |
References XRTCPSU_EVENT_ALARM_GEN.
int main | ( | void | ) |
Main function to call the RTC Alarm interrupt example.
None |
References RtcPsuAlarmIntrExample().
int RtcPsuAlarmIntrExample | ( | XScuGic * | IntcInstPtr, |
XRtcPsu * | RtcInstPtr, | ||
u16 | DeviceId, | ||
u16 | RtcIntrId | ||
) |
This function does a minimal test on the Rtc device and driver as a design example.
The purpose of this function is to illustrate how to use alarm feature in the XRtcPsu driver.
This function sets alarm for a specified time from the current time.
IntcInstPtr | is a pointer to the instance of the ScuGic driver. |
RtcInstPtr | is a pointer to the instance of the RTC driver which is going to be connected to the interrupt controller. |
DeviceId | is the device Id of the RTC device and is typically XPAR_<RTCPSU_instance>_DEVICE_ID value from xparameters.h. |
RtcIntrId | is the interrupt Id and is typically XPAR_<RTCPSU_instance>_INTR value from xparameters.h. |
This function contains an infinite loop such that if interrupts are not working it may never return.
Referenced by main().