XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
u8 XSysMon_GetAdcClkDivisor(XSysMon *InstancePtr)
{
	u16 Divisor;

	/*
	 * Assert the arguments.
	 */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	/*
	 * Read the divisor value from the Configuration Register 2.
	 */
	Divisor = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
					XSM_CFR2_OFFSET);

	return (u8) (Divisor >> XSM_CFR2_CD_SHIFT);
}
/****************************************************************************/
/**
*
* The function gets the ADCCLK divisor from the Configuration Register 2.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
*
* @return	The divisor read from the Configuration Register 2.
*
* @note		The ADCCLK is an internal clock used by the ADC and is
*		synchronized to the DCLK clock. The ADCCLK is equal to DCLK
*		divided by the user selection in the Configuration Register 2.
*
*****************************************************************************/
The function gets the ADCCLK divisor from the Configuration Register 2.
The function gets the ADCCLK divisor from the Configuration Register 2 .
u8 XSysMon_GetAdcClkDivisor(XSysMon *InstancePtr)
{
	u16 Divisor;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Divisor = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
					XSM_CFR2_OFFSET);
	return (u8) (Divisor >> XSM_CFR2_CD_SHIFT);
}
u8 XSysMon_GetAdcClkDivisor ( XSysMon * InstancePtr ) { u16 Divisor ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Divisor = ( u16 ) XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_CFR2_OFFSET ) ; return ( u8 ) ( Divisor >> XSM_CFR2_CD_SHIFT ) ; }
The function gets the ADCCLK divisor from the Configuration Register 2.
The function gets the ADCCLK divisor from the Configuration Register 2 .
/*
	 * Assert the arguments.
	 */ /*
	 * Read the divisor value from the Configuration Register 2.
	 */