XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
s32 XSysMonPsu_GetSequencerEvent(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	s32 Mode;
	u32 RegValue;
	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 Configuration Register 0. */
	RegValue = XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_CFG_REG0_OFFSET);

	RegValue &= XSYSMONPSU_CFG_REG0_EC_MASK;

	if (RegValue == XSYSMONPSU_CFG_REG0_EC_MASK) {
		Mode = XSYSMONPSU_EVENT_MODE;
	} else {
		Mode = XSYSMONPSU_CONTINUOUS_MODE;
	}

	return Mode;
}
/****************************************************************************/
/**
*
* The function returns the mode of the sequencer.
*
* @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	Returns the Sequencer mode. XSYSMONPSU_EVENT_MODE for Event mode
* 		and XSYSMONPSU_CONTINUOUS_MODE for continuous mode.
*
* @note		None.
*
*****************************************************************************/
The function returns the mode of the sequencer.
The function returns the mode of the sequencer .
s32 XSysMonPsu_GetSequencerEvent(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	s32 Mode;
	u32 RegValue;
	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);
	RegValue = XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_CFG_REG0_OFFSET);
	RegValue &= XSYSMONPSU_CFG_REG0_EC_MASK;
	if (RegValue == XSYSMONPSU_CFG_REG0_EC_MASK) {
		Mode = XSYSMONPSU_EVENT_MODE;
	} else {
		Mode = XSYSMONPSU_CONTINUOUS_MODE;
	}
	return Mode;
}
s32 XSysMonPsu_GetSequencerEvent ( XSysMonPsu * InstancePtr , u32 SysmonBlk ) { s32 Mode ; u32 RegValue ; 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 ) ; RegValue = XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_CFG_REG0_OFFSET ) ; RegValue &= XSYSMONPSU_CFG_REG0_EC_MASK ; if ( RegValue == XSYSMONPSU_CFG_REG0_EC_MASK ) { Mode = XSYSMONPSU_EVENT_MODE ; } else { Mode = XSYSMONPSU_CONTINUOUS_MODE ; } return Mode ; }
The function returns the mode of the sequencer.
The function returns the mode of the sequencer .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /* Read the Configuration Register 0. */