XilinxProcessorIPLib/drivers/rtcpsu/src/xrtcpsu.c
void XRtcPsu_SetAlarm(XRtcPsu *InstancePtr, u32 Alarm, u32 Periodic)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(Alarm != 0U);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((Alarm - XRtcPsu_GetCurrentTime(InstancePtr)) > (u32)0);

	XRtcPsu_WriteReg(InstancePtr->RtcConfig.BaseAddr+XRTC_ALRM_OFFSET,
								Alarm);
	if (Periodic != 0U) {
		InstancePtr->IsPeriodicAlarm = 1U;
		InstancePtr->PeriodicAlarmTime =
				Alarm - XRtcPsu_GetCurrentTime(InstancePtr);
	}
}
/****************************************************************************/
/**
 *
 * This function sets the alarm value of RTC device.
 *
 * @param	InstancePtr is a pointer to the XRtcPsu instance
 * @param	Alarm is the desired alarm time for RTC.
 * @param	Periodic says whether the alarm need to set at periodic
 *		Intervals or a one-time alarm.
 *
 * @return	None.
 *
 * @note		None.
 *
 *****************************************************************************/
This function sets the alarm value of RTC device.
@param       InstancePtr is a pointer to the XRtcPsu instance
@param       Alarm is the desired alarm time for RTC.
@param       Periodic says whether the alarm need to set at periodic
Intervals or a one-time alarm.

@return      None.

@note                None.
This function sets the alarm value of RTC device . @param InstancePtr is a pointer to the XRtcPsu instance @param Alarm is the desired alarm time for RTC . @param Periodic says whether the alarm need to set at periodic Intervals or a one - time alarm . @return None . @note None .
void XRtcPsu_SetAlarm(XRtcPsu *InstancePtr, u32 Alarm, u32 Periodic)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(Alarm != 0U);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((Alarm - XRtcPsu_GetCurrentTime(InstancePtr)) > (u32)0);
	XRtcPsu_WriteReg(InstancePtr->RtcConfig.BaseAddr+XRTC_ALRM_OFFSET,
								Alarm);
	if (Periodic != 0U) {
		InstancePtr->IsPeriodicAlarm = 1U;
		InstancePtr->PeriodicAlarmTime =
				Alarm - XRtcPsu_GetCurrentTime(InstancePtr);
	}
}
void XRtcPsu_SetAlarm ( XRtcPsu * InstancePtr , u32 Alarm , u32 Periodic ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( Alarm != 0U ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( ( Alarm - XRtcPsu_GetCurrentTime ( InstancePtr ) ) > ( u32 ) 0 ) ; XRtcPsu_WriteReg ( InstancePtr -> RtcConfig . BaseAddr + XRTC_ALRM_OFFSET , Alarm ) ; if ( Periodic != 0U ) { InstancePtr -> IsPeriodicAlarm = 1U ; InstancePtr -> PeriodicAlarmTime = Alarm - XRtcPsu_GetCurrentTime ( InstancePtr ) ; } }
This function sets the alarm value of RTC device.
This function sets the alarm value of RTC device .