XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
u16 XSysMon_GetAlarmThreshold(XSysMon *InstancePtr, u8 AlarmThrReg)
{
	u16 AlarmThreshold;

	/*
	 * Assert the arguments.
	 */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((AlarmThrReg <= XSM_ATR_VUSR3_UPPER) ||
			 ((AlarmThrReg >= XSM_ATR_VUSR0_LOWER) &&
			 (AlarmThrReg <= XSM_ATR_VUSR3_LOWER)));

	/*
	 * Read the specified Alarm Threshold Register and return
	 * the value.
	 */
	AlarmThreshold = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
				XSM_ATR_TEMP_UPPER_OFFSET + (AlarmThrReg << 2));

	return AlarmThreshold;
}
/****************************************************************************/
/**
*
* This function returns the contents of the specified Alarm Threshold Register.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
* @param	AlarmThrReg is the index of an Alarm Threshold Register
*		to be read. Use XSM_ATR_* constants defined in xsysmon.h
*		to specify the index.
*
* @return	A 16-bit value representing the contents of the selected Alarm
*		Threshold Register.
*
* @note		Over Temperature upper threshold is programmable only in V6 and
*		7 Series XADC
*		BRAM high and low voltage threshold registers are available only
*		in 7 Series and Zynq XADC.
*		All the remaining Alarm Threshold registers specified by the
*		constants XSM_ATR_*, are available in all the families of the
*		Sysmon.
*
*****************************************************************************/
This function returns the contents of the specified Alarm Threshold Register.
This function returns the contents of the specified Alarm Threshold Register .
u16 XSysMon_GetAlarmThreshold(XSysMon *InstancePtr, u8 AlarmThrReg)
{
	u16 AlarmThreshold;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((AlarmThrReg <= XSM_ATR_VUSR3_UPPER) ||
			 ((AlarmThrReg >= XSM_ATR_VUSR0_LOWER) &&
			 (AlarmThrReg <= XSM_ATR_VUSR3_LOWER)));
	AlarmThreshold = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
				XSM_ATR_TEMP_UPPER_OFFSET + (AlarmThrReg << 2));
	return AlarmThreshold;
}
u16 XSysMon_GetAlarmThreshold ( XSysMon * InstancePtr , u8 AlarmThrReg ) { u16 AlarmThreshold ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertNonvoid ( ( AlarmThrReg <= XSM_ATR_VUSR3_UPPER ) || ( ( AlarmThrReg >= XSM_ATR_VUSR0_LOWER ) && ( AlarmThrReg <= XSM_ATR_VUSR3_LOWER ) ) ) ; AlarmThreshold = ( u16 ) XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_ATR_TEMP_UPPER_OFFSET + ( AlarmThrReg << 2 ) ) ; return AlarmThreshold ; }
This function returns the contents of the specified Alarm Threshold Register.
This function returns the contents of the specified Alarm Threshold Register .
/*
	 * Assert the arguments.
	 */ /*
	 * Read the specified Alarm Threshold Register and return
	 * the value.
	 */