XilinxProcessorIPLib/drivers/rtcpsu/src/xrtcpsu.c
void XRtcPsu_SetTime(XRtcPsu *InstancePtr, u32 Time)
{
	/* Set the calibration value in calibration register, so that
	 * next Second is triggered exactly at 1 sec period
	 */
	XRtcPsu_WriteReg(InstancePtr->RtcConfig.BaseAddr + XRTC_CALIB_WR_OFFSET,
					InstancePtr->CalibrationValue);
	/* clear the RTC secs interrupt from status register */
	XRtcPsu_WriteReg(InstancePtr->RtcConfig.BaseAddr + XRTC_INT_STS_OFFSET,
						XRTC_INT_STS_SECS_MASK);
	InstancePtr->CurrTimeUpdated = (u32)0U;
	/* Update the flag before setting the time */
	InstancePtr->TimeUpdated = (u32)1U;
	/* Since RTC takes 1 sec to update the time into current
	 * time register, write
	 * load time + 1sec into the set time register.
	 */
	XRtcPsu_WriteSetTime(InstancePtr, Time + (u32)1U);
}
/****************************************************************************/
/**
 *
 * This function sets the RTC time by writing into rtc write register.
 *
 * @param	InstancePtr is a pointer to the XRtcPsu instance.
 * @param	Time that should be updated into RTC write register.
 *
 * @return	None.
 *
 * @note		None.
 *
 *****************************************************************************/
This function sets the RTC time by writing into rtc write register.
@param       InstancePtr is a pointer to the XRtcPsu instance.
@param       Time that should be updated into RTC write register.

@return      None.

@note                None.
This function sets the RTC time by writing into rtc write register . @param InstancePtr is a pointer to the XRtcPsu instance . @param Time that should be updated into RTC write register . @return None . @note None .
void XRtcPsu_SetTime(XRtcPsu *InstancePtr, u32 Time)
{
	XRtcPsu_WriteReg(InstancePtr->RtcConfig.BaseAddr + XRTC_CALIB_WR_OFFSET,
					InstancePtr->CalibrationValue);
	XRtcPsu_WriteReg(InstancePtr->RtcConfig.BaseAddr + XRTC_INT_STS_OFFSET,
						XRTC_INT_STS_SECS_MASK);
	InstancePtr->CurrTimeUpdated = (u32)0U;
	InstancePtr->TimeUpdated = (u32)1U;
	XRtcPsu_WriteSetTime(InstancePtr, Time + (u32)1U);
}
void XRtcPsu_SetTime ( XRtcPsu * InstancePtr , u32 Time ) { XRtcPsu_WriteReg ( InstancePtr -> RtcConfig . BaseAddr + XRTC_CALIB_WR_OFFSET , InstancePtr -> CalibrationValue ) ; XRtcPsu_WriteReg ( InstancePtr -> RtcConfig . BaseAddr + XRTC_INT_STS_OFFSET , XRTC_INT_STS_SECS_MASK ) ; InstancePtr -> CurrTimeUpdated = ( u32 ) 0U ; InstancePtr -> TimeUpdated = ( u32 ) 1U ; XRtcPsu_WriteSetTime ( InstancePtr , Time + ( u32 ) 1U ) ; }
This function sets the RTC time by writing into rtc write register.
This function sets the RTC time by writing into rtc write register .
/* Set the calibration value in calibration register, so that
	 * next Second is triggered exactly at 1 sec period
	 */ /* clear the RTC secs interrupt from status register */ /* Update the flag before setting the time */ /* Since RTC takes 1 sec to update the time into current
	 * time register, write
	 * load time + 1sec into the set time register.
	 */