XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
void XSysMon_SetAlarmThreshold(XSysMon *InstancePtr, u8 AlarmThrReg, u16 Value)
{
	/*
	 * Assert the arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((AlarmThrReg <= XSM_ATR_VUSR3_UPPER) ||
			((AlarmThrReg >= XSM_ATR_VUSR0_LOWER) &&
			(AlarmThrReg <= XSM_ATR_VUSR3_LOWER)));

	/*
	 * Write the value into the specified Alarm Threshold Register.
	 */
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress,
			 XSM_ATR_TEMP_UPPER_OFFSET + (AlarmThrReg << 2),
			 Value);
}
/****************************************************************************/
/**
*
* This functions sets the contents of the given Alarm Threshold Register.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
* @param	AlarmThrReg is the index of an Alarm Threshold Register to
*		be set. Use XSM_ATR_* constants defined in xsysmon.h to
*		specify the index.
* @param	Value is the 16-bit threshold value to write into the register.
*
* @return	None.
*
* @note		Over Temperature upper threshold is programmable only in V6,
*		7 Series/Zynq  XADC and UltraScale.
*		BRAM high and low voltage threshold registers are available only
*		in 7 Series XADC and UltraScale.
*		VUSER0 to VUSER3 threshold registers are available only in
*		UltraScale.
*		All the remaining Alarm Threshold registers specified by the
*		constants XSM_ATR_*, are available in all the families of the
*		Sysmon.
*
*****************************************************************************/
This functions sets the contents of the given Alarm Threshold Register.
This functions sets the contents of the given Alarm Threshold Register .
void XSysMon_SetAlarmThreshold(XSysMon *InstancePtr, u8 AlarmThrReg, u16 Value)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((AlarmThrReg <= XSM_ATR_VUSR3_UPPER) ||
			((AlarmThrReg >= XSM_ATR_VUSR0_LOWER) &&
			(AlarmThrReg <= XSM_ATR_VUSR3_LOWER)));
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress,
			 XSM_ATR_TEMP_UPPER_OFFSET + (AlarmThrReg << 2),
			 Value);
}
void XSysMon_SetAlarmThreshold ( XSysMon * InstancePtr , u8 AlarmThrReg , u16 Value ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( ( AlarmThrReg <= XSM_ATR_VUSR3_UPPER ) || ( ( AlarmThrReg >= XSM_ATR_VUSR0_LOWER ) && ( AlarmThrReg <= XSM_ATR_VUSR3_LOWER ) ) ) ; XSysMon_WriteReg ( InstancePtr -> Config . BaseAddress , XSM_ATR_TEMP_UPPER_OFFSET + ( AlarmThrReg << 2 ) , Value ) ; }
This functions sets the contents of the given Alarm Threshold Register.
This functions sets the contents of the given Alarm Threshold Register .
/*
	 * Assert the arguments.
	 */ /*
	 * Write the value into the specified Alarm Threshold Register.
	 */