XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
u64 XSysMonPsu_GetSeqInputMode(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u64 InputMode;
	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);

	/*
	 *  Get the input mode for all the channels from the ADC Channel
	 * Analog-Input Mode Sequencer Registers.
	 */
	InputMode = (u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_INPUT_MDE0_OFFSET) & XSYSMONPSU_SEQ_INPUT_MDE0_MASK;
	InputMode |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_INPUT_MDE1_OFFSET) & XSYSMONPSU_SEQ_INPUT_MDE1_MASK) <<
				XSM_SEQ_CH_SHIFT;
	InputMode |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_INPUT_MDE2_OFFSET) &
			XSYSMONPSU_SEQ_INPUT_MDE2_MASK) << XSM_SEQ_CH2_SHIFT;

	return InputMode;
}
/****************************************************************************/
/**
*
* This function gets the Analog input mode for all the channels from
* the ADC Channel Analog-Input Mode Sequencer Registers.
*
* @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.
*
* @returns 	The input mode for all the channels.
*		Use XSYSMONPSU_SEQ_INPUT_MDE* defined in xsysmonpsu_hw.h to interpret the
*		Channel numbers. Bit masks of 1 are the channels for which
*		input mode is differential/Bipolar and bit mask of 0 are the channels
*		for which input mode is unipolar.
*
* @note		None.
*
*****************************************************************************/
This function gets the Analog input mode for all the channels from
the ADC Channel Analog-Input Mode Sequencer Registers.
This function gets the Analog input mode for all the channels from the ADC Channel Analog - Input Mode Sequencer Registers .
u64 XSysMonPsu_GetSeqInputMode(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u64 InputMode;
	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);
	InputMode = (u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_INPUT_MDE0_OFFSET) & XSYSMONPSU_SEQ_INPUT_MDE0_MASK;
	InputMode |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_INPUT_MDE1_OFFSET) & XSYSMONPSU_SEQ_INPUT_MDE1_MASK) <<
				XSM_SEQ_CH_SHIFT;
	InputMode |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_INPUT_MDE2_OFFSET) &
			XSYSMONPSU_SEQ_INPUT_MDE2_MASK) << XSM_SEQ_CH2_SHIFT;
	return InputMode;
}
u64 XSysMonPsu_GetSeqInputMode ( XSysMonPsu * InstancePtr , u32 SysmonBlk ) { u64 InputMode ; 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 ) ; InputMode = ( u64 ) XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_SEQ_INPUT_MDE0_OFFSET ) & XSYSMONPSU_SEQ_INPUT_MDE0_MASK ; InputMode |= ( ( u64 ) XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_SEQ_INPUT_MDE1_OFFSET ) & XSYSMONPSU_SEQ_INPUT_MDE1_MASK ) << XSM_SEQ_CH_SHIFT ; InputMode |= ( ( u64 ) XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_SEQ_INPUT_MDE2_OFFSET ) & XSYSMONPSU_SEQ_INPUT_MDE2_MASK ) << XSM_SEQ_CH2_SHIFT ; return InputMode ; }
This function gets the Analog input mode for all the channels from
the ADC Channel Analog-Input Mode Sequencer Registers.
This function gets the Analog input mode for all the channels from the ADC Channel Analog - Input Mode Sequencer Registers .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /*
	 *  Get the input mode for all the channels from the ADC Channel
	 * Analog-Input Mode Sequencer Registers.
	 */