XilinxProcessorIPLib/drivers/sysmonpsu/src/xsysmonpsu.c
u32 XSysMonPsu_GetExtenalMux(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	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 and derive the channel selection
	 * bits.
	 */
	RegValue = XSysmonPsu_ReadReg(EffectiveBaseAddress +
					XSYSMONPSU_CFG_REG0_OFFSET);
	RegValue &= XSYSMONPSU_CFG_REG0_MUX_CH_MASK;

	return RegValue;
}
/****************************************************************************/
/**
*
* The function returns the external mux channel.
*
* @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 channel number used to connect to the external
*		Mux. The valid channels are 0 to 6, 8 to 16, and 31 to 36..
*
* @note		None.
*
*****************************************************************************/
The function returns the external mux channel.
The function returns the external mux channel .
u32 XSysMonPsu_GetExtenalMux(XSysMonPsu *InstancePtr, u32 SysmonBlk)
{
	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_MUX_CH_MASK;
	return RegValue;
}
u32 XSysMonPsu_GetExtenalMux ( XSysMonPsu * InstancePtr , u32 SysmonBlk ) { 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_MUX_CH_MASK ; return RegValue ; }
The function returns the external mux channel.
The function returns the external mux channel .
/* Assert the arguments. */ /* Calculate the effective baseaddress based on the Sysmon instance. */ /*
	 * Read the Configuration Register 0 and derive the channel selection
	 * bits.
	 */