Refer to the xadcps.h header file for more information about this driver.
MODIFICATION HISTORY:
Ver Who Date Changes ----- ----- -------- ----------------------------------------------------- 1.00a ssb 12/22/11 First release based on the XPS/AXI xadc driver 1.01a bss 02/18/13 Modified XAdcPs_SetSeqChEnables,XAdcPs_SetSeqAvgEnables XAdcPs_SetSeqInputMode and XAdcPs_SetSeqAcqTime APIs to fix CR #693371
#include "xadcps.h"
Functions | |
void | XAdcPs_WriteInternalReg (XAdcPs *InstancePtr, u32 RegOffset, u32 Data) |
u32 | XAdcPs_ReadInternalReg (XAdcPs *InstancePtr, u32 RegOffset) |
int | XAdcPs_CfgInitialize (XAdcPs *InstancePtr, XAdcPs_Config *ConfigPtr, u32 EffectiveAddr) |
void | XAdcPs_SetConfigRegister (XAdcPs *InstancePtr, u32 Data) |
u32 | XAdcPs_GetConfigRegister (XAdcPs *InstancePtr) |
u32 | XAdcPs_GetMiscStatus (XAdcPs *InstancePtr) |
void | XAdcPs_SetMiscCtrlRegister (XAdcPs *InstancePtr, u32 Data) |
u32 | XAdcPs_GetMiscCtrlRegister (XAdcPs *InstancePtr) |
void | XAdcPs_Reset (XAdcPs *InstancePtr) |
u16 | XAdcPs_GetAdcData (XAdcPs *InstancePtr, u8 Channel) |
u16 | XAdcPs_GetCalibCoefficient (XAdcPs *InstancePtr, u8 CoeffType) |
u16 | XAdcPs_GetMinMaxMeasurement (XAdcPs *InstancePtr, u8 MeasurementType) |
void | XAdcPs_SetAvg (XAdcPs *InstancePtr, u8 Average) |
u8 | XAdcPs_GetAvg (XAdcPs *InstancePtr) |
int | XAdcPs_SetSingleChParams (XAdcPs *InstancePtr, u8 Channel, int IncreaseAcqCycles, int IsEventMode, int IsDifferentialMode) |
void | XAdcPs_SetAlarmEnables (XAdcPs *InstancePtr, u16 AlmEnableMask) |
u16 | XAdcPs_GetAlarmEnables (XAdcPs *InstancePtr) |
void | XAdcPs_SetCalibEnables (XAdcPs *InstancePtr, u16 Calibration) |
u16 | XAdcPs_GetCalibEnables (XAdcPs *InstancePtr) |
void | XAdcPs_SetSequencerMode (XAdcPs *InstancePtr, u8 SequencerMode) |
u8 | XAdcPs_GetSequencerMode (XAdcPs *InstancePtr) |
void | XAdcPs_SetAdcClkDivisor (XAdcPs *InstancePtr, u8 Divisor) |
u8 | XAdcPs_GetAdcClkDivisor (XAdcPs *InstancePtr) |
int | XAdcPs_SetSeqChEnables (XAdcPs *InstancePtr, u32 ChEnableMask) |
u32 | XAdcPs_GetSeqChEnables (XAdcPs *InstancePtr) |
int | XAdcPs_SetSeqAvgEnables (XAdcPs *InstancePtr, u32 AvgEnableChMask) |
u32 | XAdcPs_GetSeqAvgEnables (XAdcPs *InstancePtr) |
int | XAdcPs_SetSeqInputMode (XAdcPs *InstancePtr, u32 InputModeChMask) |
u32 | XAdcPs_GetSeqInputMode (XAdcPs *InstancePtr) |
int | XAdcPs_SetSeqAcqTime (XAdcPs *InstancePtr, u32 AcqCyclesChMask) |
u32 | XAdcPs_GetSeqAcqTime (XAdcPs *InstancePtr) |
void | XAdcPs_SetAlarmThreshold (XAdcPs *InstancePtr, u8 AlarmThrReg, u16 Value) |
u16 | XAdcPs_GetAlarmThreshold (XAdcPs *InstancePtr, u8 AlarmThrReg) |
void | XAdcPs_EnableUserOverTemp (XAdcPs *InstancePtr) |
void | XAdcPs_DisableUserOverTemp (XAdcPs *InstancePtr) |
void | XAdcPs_SetSequencerEvent (XAdcPs *InstancePtr, int IsEventMode) |
int | XAdcPs_GetSamplingMode (XAdcPs *InstancePtr) |
void | XAdcPs_SetMuxMode (XAdcPs *InstancePtr, int MuxMode, u8 Channel) |
void | XAdcPs_SetPowerdownMode (XAdcPs *InstancePtr, u32 Mode) |
u32 | XAdcPs_GetPowerdownMode (XAdcPs *InstancePtr) |
|
This function initializes a specific XAdcPs device/instance. This function must be called prior to using the XADC device.
|
|
This function disables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register.
|
|
This function enables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register.
|
|
The function gets the ADCCLK divisor from the Configuration Register 2.
|
|
Get the ADC converted data for the specified channel.
|
|
This function gets the status of the alarm output enables in the Configuration Register 1.
|
|
This function returns the contents of the specified Alarm Threshold Register.
|
|
This function returns the number of samples of averaging configured for all the channels in the Configuration Register 0.
|
|
This function gets the calibration coefficient data for the specified parameter.
|
|
This function reads the value of the calibration enables from the Configuration Register 1.
|
|
The functions reads the contents of the Config Register.
|
|
This function reads the Minimum/Maximum measurement for one of the specified parameters. Use XADCPS_MAX_* and XADCPS_MIN_* constants defined in xadcps.h to specify the parameters (Temperature, VccInt, VccAux, VBram, VccPInt, VccPAux and VccPDro).
|
|
The functions reads the contents of the Miscellaneous control register.
|
|
The functions reads the contents of the Miscellaneous Status Register.
|
|
This function gets the Power Down mode.
|
|
This function returns the sampling mode.
|
|
This function gets the status of acquisition from the ADC Channel Acquisition Time Sequencer Registers.
|
|
This function returns the channels for which the averaging has been enabled in the ADC Channel Averaging Enables Sequencer Registers.
|
|
This function gets the channel enable bits status from the ADC Channel Selection Sequencer Registers.
|
|
This function gets the Analog input mode for all the channels from the ADC Channel Analog-Input Mode Sequencer Registers.
|
|
This function gets the channel sequencer mode from the Configuration Register 1.
|
|
This function is used for reading from the XADC Registers using the Data FIFO.
|
|
This function resets the XADC Hard Macro in the device.
|
|
The function sets the frequency of the ADCCLK by configuring the DCLK to ADCCLK ratio in the Configuration Register #2
|
|
This function enables the alarm outputs for the specified alarms in the Configuration Register 1.
|
|
This functions sets the contents of the given Alarm Threshold Register.
|
|
This function sets the number of samples of averaging that is to be done for all the channels in both the single channel mode and sequence mode of operations.
|
|
This function enables the specified calibration in the Configuration Register 1 :
|
|
The functions sets the contents of the Config Register.
|
|
The functions sets the contents of the Miscellaneous Control register.
|
|
This function sets the External Mux mode.
|
|
This function sets the Power Down mode.
|
|
This function sets the number of Acquisition cycles in the ADC Channel Acquisition Time Sequencer Registers. The sequencer must be disabled before writing to these regsiters.
|
|
This function enables the averaging for the specified channels in the ADC Channel Averaging Enable Sequencer Registers. The sequencer must be disabled before writing to these regsiters.
|
|
This function enables the specified channels in the ADC Channel Selection Sequencer Registers. The sequencer must be disabled before writing to these regsiters.
|
|
This function sets the Analog input mode for the specified channels in the ADC Channel Analog-Input Mode Sequencer Registers. The sequencer must be disabled before writing to these regsiters.
|
|
The function enables the Event mode or Continuous mode in the sequencer mode.
|
|
This function sets the specified Channel Sequencer Mode in the Configuration Register 1 :
|
|
The function sets the given parameters in the Configuration Register 0 in the single channel mode.
|
|
This function is used for writing to XADC Registers using the command FIFO.
|