XilinxProcessorIPLib/drivers/sysmon/src/xsysmon.c
u16 XSysMon_GetCalibCoefficient(XSysMon *InstancePtr, u8 CoeffType)
{
	u16 CalibData;

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

	/*
	 * Read the selected calibration coefficient.
	 */
	CalibData = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
			  XSM_SUPPLY_CALIB_OFFSET + (CoeffType << 2));

	return CalibData;
}
/****************************************************************************/
/**
*
* This function gets the calibration coefficient data for the specified
* parameter.
*
* @param	InstancePtr is a pointer to the XSysMon instance.
* @param	CoeffType specifies the calibration coefficient
*		to be read. Use XSM_CALIB_* constants defined in xsysmon.h to
*		specify the calibration coefficient to be read.
*
* @return	A 16-bit value representing the calibration coefficient.
*		The System Monitor/ADC device guarantees a 10 bit resolution for
*		the ADC converted data and data is the 10 MSB bits of the 16
*		data read from the device.
*
* @note		None.
*
*****************************************************************************/
This function gets the calibration coefficient data for the specified
parameter.
This function gets the calibration coefficient data for the specified parameter .
u16 XSysMon_GetCalibCoefficient(XSysMon *InstancePtr, u8 CoeffType)
{
	u16 CalibData;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid(CoeffType <= XSM_CALIB_GAIN_ERROR_COEFF);
	CalibData = (u16) XSysMon_ReadReg(InstancePtr->Config.BaseAddress,
			  XSM_SUPPLY_CALIB_OFFSET + (CoeffType << 2));
	return CalibData;
}
u16 XSysMon_GetCalibCoefficient ( XSysMon * InstancePtr , u8 CoeffType ) { u16 CalibData ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertNonvoid ( CoeffType <= XSM_CALIB_GAIN_ERROR_COEFF ) ; CalibData = ( u16 ) XSysMon_ReadReg ( InstancePtr -> Config . BaseAddress , XSM_SUPPLY_CALIB_OFFSET + ( CoeffType << 2 ) ) ; return CalibData ; }
This function gets the calibration coefficient data for the specified
parameter.
This function gets the calibration coefficient data for the specified parameter .
/*
	 * Assert the arguments.
	 */ /*
	 * Read the selected calibration coefficient.
	 */