XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
u64 XSysMonPsu_GetSeqAcqTime(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u64 RegValAcq;
	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 Acquisition cycles for the specified channels from the ADC
	 * Channel Acquisition Time Sequencer Registers.
	 */
	RegValAcq = (u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_SEQ_ACQ0_OFFSET) & XSYSMONPSU_SEQ_ACQ0_MASK;
	RegValAcq |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_SEQ_ACQ1_OFFSET) & XSYSMONPSU_SEQ_ACQ1_MASK) <<
					XSM_SEQ_CH_SHIFT;
	RegValAcq |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_ACQ2_OFFSET) &
			XSYSMONPSU_SEQ_ACQ2_MASK) << XSM_SEQ_CH2_SHIFT;

	return RegValAcq;
}
/****************************************************************************/
/**
*
* This function gets the status of acquisition time from the ADC Channel Acquisition
* Time 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 acquisition time for all the channels.
*		Use XSYSMONPSU_SEQ_ACQ* defined in xsysmonpsu_hw.h to interpret the
*		Channel numbers. Bit masks of 1 are the channels for which
*		acquisition cycles are extended and bit mask of 0 are the
*		channels for which acquisition cycles are not extended.
*
* @note		None.
*
*****************************************************************************/
This function gets the status of acquisition time from the ADC Channel Acquisition
Time Sequencer Registers.
This function gets the status of acquisition time from the ADC Channel Acquisition Time Sequencer Registers .
u64 XSysMonPsu_GetSeqAcqTime(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	u64 RegValAcq;
	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);
	RegValAcq = (u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_SEQ_ACQ0_OFFSET) & XSYSMONPSU_SEQ_ACQ0_MASK;
	RegValAcq |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_SEQ_ACQ1_OFFSET) & XSYSMONPSU_SEQ_ACQ1_MASK) <<
					XSM_SEQ_CH_SHIFT;
	RegValAcq |= ((u64)XSysmonPsu_ReadReg(EffectiveBaseAddress +
			XSYSMONPSU_SEQ_ACQ2_OFFSET) &
			XSYSMONPSU_SEQ_ACQ2_MASK) << XSM_SEQ_CH2_SHIFT;
	return RegValAcq;
}
u64 XSysMonPsu_GetSeqAcqTime ( XSysMonPsu * InstancePtr , u32 SysmonBlk ) { u64 RegValAcq ; 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 ) ; RegValAcq = ( u64 ) XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_SEQ_ACQ0_OFFSET ) & XSYSMONPSU_SEQ_ACQ0_MASK ; RegValAcq |= ( ( u64 ) XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_SEQ_ACQ1_OFFSET ) & XSYSMONPSU_SEQ_ACQ1_MASK ) << XSM_SEQ_CH_SHIFT ; RegValAcq |= ( ( u64 ) XSysmonPsu_ReadReg ( EffectiveBaseAddress + XSYSMONPSU_SEQ_ACQ2_OFFSET ) & XSYSMONPSU_SEQ_ACQ2_MASK ) << XSM_SEQ_CH2_SHIFT ; return RegValAcq ; }
This function gets the status of acquisition time from the ADC Channel Acquisition
Time Sequencer Registers.
This function gets the status of acquisition time from the ADC Channel Acquisition Time Sequencer Registers .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /*
	 * Get the Acquisition cycles for the specified channels from the ADC
	 * Channel Acquisition Time Sequencer Registers.
	 */