XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
u8 XSysMonPsu_GetSequencerMode(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u8 SequencerMode;
	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 channel sequencer mode from the Configuration Register 1. */
	SequencerMode =  ((u8) ((XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_CFG_REG1_OFFSET) & XSYSMONPSU_CFG_REG1_SEQ_MDE_MASK) >>
			XSYSMONPSU_CFG_REG1_SEQ_MDE_SHIFT));

	return SequencerMode;
}
/****************************************************************************/
/**
*
* This function gets the channel sequencer mode from the Configuration
* Register 1.
*
* @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	The channel sequencer mode :
*		- XSM_SEQ_MODE_SAFE : Default safe mode
*		- XSM_SEQ_MODE_ONEPASS : One pass through sequence
*		- XSM_SEQ_MODE_CONTINPASS : Continuous channel sequencing
*		- XSM_SEQ_MODE_SINGCHAN : Single channel/Sequencer off
*		- XSM_SEQ_MODE_OLYMPUS : Olympus sampling mode
*
* @note		None.
*
*****************************************************************************/
This function gets the channel sequencer mode from the Configuration
Register 1.
This function gets the channel sequencer mode from the Configuration Register 1 .
u8 XSysMonPsu_GetSequencerMode(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u8 SequencerMode;
	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);
	SequencerMode =  ((u8) ((XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_CFG_REG1_OFFSET) & XSYSMONPSU_CFG_REG1_SEQ_MDE_MASK) >>
			XSYSMONPSU_CFG_REG1_SEQ_MDE_SHIFT));
	return SequencerMode;
}
u8 XSysMonPsu_GetSequencerMode ( XSysMonPsu * InstancePtr , u32 SysmonBlk ) { u8 SequencerMode ; 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 ) ; SequencerMode = ( ( u8 ) ( ( XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_CFG_REG1_OFFSET ) & XSYSMONPSU_CFG_REG1_SEQ_MDE_MASK ) >> XSYSMONPSU_CFG_REG1_SEQ_MDE_SHIFT ) ) ; return SequencerMode ; }
This function gets the channel sequencer mode from the Configuration
Register 1.
This function gets the channel sequencer mode from the Configuration Register 1 .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /* Read the channel sequencer mode from the Configuration Register 1. */