XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
void XSysMon_SetExtenalMux(XSysMon *InstancePtr, u8 Channel)
{
	u32 RegValue;

	/*
	 * Assert the arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((Channel <= XSM_CH_VREFN) ||
			  (Channel == XSM_CH_CALIBRATION) ||
			  ((Channel >= XSM_CH_AUX_MIN) &&
			  (Channel <= XSM_CH_AUX_MAX)));

	/*
	 * Read the Configuration Register 0 and the clear the channel selection
	 * bits.
	 */
	RegValue = XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
				   XSM_CFR0_OFFSET);
	RegValue &= ~(XSM_CFR0_CHANNEL_MASK);

	/*
	 * Enable the External Mux and select the channel.
	 */
	RegValue |= (XSM_CFR0_MUX_MASK | Channel);
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress, XSM_CFR0_OFFSET,
			 RegValue);
}
/****************************************************************************/
/**
*
* The function enables the external mux and connects a channel to the mux.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
* @param	Channel is the channel number used to connect to the external
*		Mux. The valid channels are 0 to 6, 8, and 16 to 31.
*
* @return
*		- XST_SUCCESS if the given values were written successfully to
*		the Configuration Register 0.
*		- XST_FAILURE if the channel sequencer is enabled or the input
*		parameters are not valid for the selected channel.
*
* @note		The External Mux is only available in 7 Series and Zynq XADC.
*		This API should be used only with 7 Series and Zynq XADC.
*
*****************************************************************************/
The function enables the external mux and connects a channel to the mux.
The function enables the external mux and connects a channel to the mux .
void XSysMon_SetExtenalMux(XSysMon *InstancePtr, u8 Channel)
{
	u32 RegValue;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid((Channel <= XSM_CH_VREFN) ||
			  (Channel == XSM_CH_CALIBRATION) ||
			  ((Channel >= XSM_CH_AUX_MIN) &&
			  (Channel <= XSM_CH_AUX_MAX)));
	RegValue = XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
				   XSM_CFR0_OFFSET);
	RegValue &= ~(XSM_CFR0_CHANNEL_MASK);
	RegValue |= (XSM_CFR0_MUX_MASK | Channel);
	XSysMon_WriteReg(InstancePtr->Config.BaseAddress, XSM_CFR0_OFFSET,
			 RegValue);
}
void XSysMon_SetExtenalMux ( XSysMon * InstancePtr , u8 Channel ) { u32 RegValue ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( ( Channel <= XSM_CH_VREFN ) || ( Channel == XSM_CH_CALIBRATION ) || ( ( Channel >= XSM_CH_AUX_MIN ) && ( Channel <= XSM_CH_AUX_MAX ) ) ) ; RegValue = XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_CFR0_OFFSET ) ; RegValue &= ~ ( XSM_CFR0_CHANNEL_MASK ) ; RegValue |= ( XSM_CFR0_MUX_MASK | Channel ) ; XSysMon_WriteReg ( InstancePtr -> Config . BaseAddress , XSM_CFR0_OFFSET , RegValue ) ; }
The function enables the external mux and connects a channel to the mux.
The function enables the external mux and connects a channel to the mux .
/*
	 * Assert the arguments.
	 */ /*
	 * Read the Configuration Register 0 and the clear the channel selection
	 * bits.
	 */ /*
	 * Enable the External Mux and select the channel.
	 */