XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
u32 XSysMon_GetAlarmEnables(XSysMon *InstancePtr)
{
	u32 RegValue1;
#if XPAR_SYSMON_0_IP_TYPE == SYSTEM_MANAGEMENT
	u32 RegValue2;
#endif
	/*
	 * Assert the arguments.
	 */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	/*
	 * Read the status of alarm output enables from the Configuration
	 * Register 1.
	 */
	RegValue1 = XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
			XSM_CFR1_OFFSET) & XSM_CFR1_ALM_ALL_MASK;
	RegValue1 = (~RegValue1 & XSM_CFR1_ALM_ALL_MASK);

#if XPAR_SYSMON_0_IP_TYPE == SYSTEM_MANAGEMENT
	/*
	* Read the status of alarm output enables from the Configuration
	* Register 3.
	*/
	RegValue2 = XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
				XSM_CFR3_OFFSET) & XSM_CFR3_ALM_ALL_MASK;
	RegValue2 = (~RegValue2 & XSM_CFR3_ALM_ALL_MASK);

	return ((RegValue2 << 16) | RegValue1);
#else
	return RegValue1;
#endif
}
/****************************************************************************/
/**
*
* This function gets the status of the alarm output enables in the
* Configuration Register 1.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
*
* @return	This is the bit-mask of the enabled alarm outputs in the
*		Configuration Register 1. Use the masks XSM_CFR_ALM_*,
*		XSM_CFR_ALM*_* and XSM_CFR_OT_MASK defined in
*		xsysmon_hw.h to interpret the returned value.
*
*		Bit positions of 1 indicate that the alarm output is enabled.
*		Bit positions of 0 indicate that the alarm output is disabled.
*
*
* @note		The implementation of the alarm enables in the Configuration
*		register 1 is such that alarms for the bit positions of 1 will
*		be disabled and alarms for bit positions of 0 will be enabled.
*		The enabled alarm outputs returned by this function is the
*		negated value of the the data read from the Configuration
*		Register 1.
*
*****************************************************************************/
This function gets the status of the alarm output enables in the
Configuration Register 1.
This function gets the status of the alarm output enables in the Configuration Register 1 .
u32 XSysMon_GetAlarmEnables(XSysMon *InstancePtr)
{
	u32 RegValue1;
#if XPAR_SYSMON_0_IP_TYPE == SYSTEM_MANAGEMENT
	u32 RegValue2;
#endif
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	RegValue1 = XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
			XSM_CFR1_OFFSET) & XSM_CFR1_ALM_ALL_MASK;
	RegValue1 = (~RegValue1 & XSM_CFR1_ALM_ALL_MASK);
#if XPAR_SYSMON_0_IP_TYPE == SYSTEM_MANAGEMENT
	RegValue2 = XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
				XSM_CFR3_OFFSET) & XSM_CFR3_ALM_ALL_MASK;
	RegValue2 = (~RegValue2 & XSM_CFR3_ALM_ALL_MASK);
	return ((RegValue2 << 16) | RegValue1);
#else
	return RegValue1;
#endif
}
u32 XSysMon_GetAlarmEnables ( XSysMon * InstancePtr ) { u32 RegValue1 ; #if XPAR_SYSMON_0_IP_TYPE == SYSTEM_MANAGEMENT u32 RegValue2 ; #endif Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; RegValue1 = XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_CFR1_OFFSET ) & XSM_CFR1_ALM_ALL_MASK ; RegValue1 = ( ~ RegValue1 & XSM_CFR1_ALM_ALL_MASK ) ; #if XPAR_SYSMON_0_IP_TYPE == SYSTEM_MANAGEMENT RegValue2 = XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_CFR3_OFFSET ) & XSM_CFR3_ALM_ALL_MASK ; RegValue2 = ( ~ RegValue2 & XSM_CFR3_ALM_ALL_MASK ) ; return ( ( RegValue2 << 16 ) | RegValue1 ) ; #else return RegValue1 ; #endif }
This function gets the status of the alarm output enables in the
Configuration Register 1.
This function gets the status of the alarm output enables in the Configuration Register 1 .
/*
	 * Assert the arguments.
	 */ /*
	 * Read the status of alarm output enables from the Configuration
	 * Register 1.
	 */ /*
	* Read the status of alarm output enables from the Configuration
	* Register 3.
	*/