XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
u32 XSysMonPsu_GetStatus(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u32 Status;
	UINTPTR EffectiveBaseAddress;

	/* Assert the arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((SysmonBlk == XSYSMON_PS)||(SysmonBlk == XSYSMON_PL));

	/* Calculate the effective baseaddress based on the Sysmon instance. */
	EffectiveBaseAddress =
			XSysMonPsu_GetEffBaseAddress(InstancePtr->Config.BaseAddress,
					SysmonBlk);

	/* Read the Sysmon Status Register and return the value. */
	Status = XSysmonPsu_ReadReg(EffectiveBaseAddress + XSYSMONPSU_MON_STS_OFFSET);

	return Status;
}
/****************************************************************************/
/**
*
* This function reads the contents of the Status Register.
*
* @param	InstancePtr is a pointer to the XSysMonPsu instance.
* @param	SysmonBlk is the value that tells whether it is for PS Sysmon
*       block or PL Sysmon block register region.
*
* @return	A 32-bit value representing the contents of the Status Register.
*		Use the XSYSMONPSU_MON_STS_* constants defined in xsysmonpsu_hw.h to
*		interpret the returned value.
*
* @note		None.
*****************************************************************************/
This function reads the contents of the Status Register.
This function reads the contents of the Status Register .
u32 XSysMonPsu_GetStatus(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u32 Status;
	UINTPTR EffectiveBaseAddress;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((SysmonBlk == XSYSMON_PS)||(SysmonBlk == XSYSMON_PL));
	EffectiveBaseAddress =
			XSysMonPsu_GetEffBaseAddress(InstancePtr->Config.BaseAddress,
					SysmonBlk);
	Status = XSysmonPsu_ReadReg(EffectiveBaseAddress + XSYSMONPSU_MON_STS_OFFSET);
	return Status;
}
u32 XSysMonPsu_GetStatus ( XSysMonPsu * InstancePtr , u32 SysmonBlk ) { u32 Status ; UINTPTR EffectiveBaseAddress ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertNonvoid ( ( SysmonBlk == XSYSMON_PS ) || ( SysmonBlk == XSYSMON_PL ) ) ; EffectiveBaseAddress = XSysMonPsu_GetEffBaseAddress ( InstancePtr -> Config . BaseAddress , SysmonBlk ) ; Status = XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_MON_STS_OFFSET ) ; return Status ; }
This function reads the contents of the Status Register.
This function reads the contents of the Status Register .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /* Read the Sysmon Status Register and return the value. */