rtcpsu
Xilinx SDK Drivers API Documentation
xrtcpsu_set_time_example.c File Reference

Overview

This file contains an example using the XRtcPsu driver.

This function updates the current time.

Note
If the device does not work properly, the example may hang.

MODIFICATION HISTORY:

Ver   Who    Date     Changes


1.00 kvn 05/12/15 First Release 1.6 tjs 09/17/18 Fixed compilation warnings

 

Functions

int RtcPsuSetTimeExample (u16 DeviceId)
 This function does a minimal set time test on the XRtcPsu device. More...
 
int main (void)
 Main function to call the Rtc Set time example. More...
 

Function Documentation

int main ( void  )

Main function to call the Rtc Set time example.

Parameters
None
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None

References RtcPsuSetTimeExample().

int RtcPsuSetTimeExample ( u16  DeviceId)

This function does a minimal set time test on the XRtcPsu device.

This function updates the current time to a specified time.

Parameters
DeviceIdis the unique device id from hardware build.
Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful
Note
None.

References XRtcPsu_Config::BaseAddr, XRtcPsu_DateTimeToSec(), XRtcPsu_GetCurrentTime(), XRtcPsu_GetLastSetTime, XRtcPsu_LookupConfig(), XRtcPsu_SecToDateTime(), XRtcPsu_SelfTest(), and XRtcPsu_SetTime().

Referenced by main().