![]() |
xadcps
Xilinx SDK Drivers API Documentation
|
Data Structures | |
| struct | XAdcPs_Config |
| This typedef contains configuration information for the XADC/ADC device. More... | |
| struct | XAdcPs |
| The driver's instance data. More... | |
Macros | |
| #define | XAdcPs_IsEventSamplingModeSet(InstancePtr) |
| This macro checks if the XADC device is in Event Sampling mode. More... | |
| #define | XAdcPs_IsExternalMuxModeSet(InstancePtr) |
| This macro checks if the XADC device is in External Mux mode. More... | |
| #define | XAdcPs_RawToTemperature(AdcData) ((((float)(AdcData)/65536.0f)/0.00198421639f ) - 273.15f) |
| This macro converts XADC Raw Data to Temperature(centigrades). More... | |
| #define | XAdcPs_RawToVoltage(AdcData) ((((float)(AdcData))* (3.0f))/65536.0f) |
| This macro converts XADC/ADC Raw Data to Voltage(volts). More... | |
| #define | XAdcPs_TemperatureToRaw(Temperature) ((int)(((Temperature) + 273.15f)*65536.0f*0.00198421639f)) |
| This macro converts Temperature in centigrades to XADC/ADC Raw Data. More... | |
| #define | XAdcPs_VoltageToRaw(Voltage) ((int)((Voltage)*65536.0f/3.0f)) |
| This macro converts Voltage in Volts to XADC/ADC Raw Data. More... | |
| #define | XAdcPs_WriteFifo(InstancePtr, Data) |
| This macro is used for writing to the XADC Registers using the command FIFO. More... | |
| #define | XAdcPs_ReadFifo(InstancePtr) |
| This macro is used for reading from the XADC Registers using the data FIFO. More... | |
Indexes for the different channels. | |
| #define | XADCPS_CH_TEMP 0x0 |
| On Chip Temperature. More... | |
| #define | XADCPS_CH_VCCINT 0x1 |
| VCCINT. More... | |
| #define | XADCPS_CH_VCCAUX 0x2 |
| VCCAUX. More... | |
| #define | XADCPS_CH_VPVN 0x3 |
| VP/VN Dedicated analog inputs. More... | |
| #define | XADCPS_CH_VREFP 0x4 |
| VREFP. More... | |
| #define | XADCPS_CH_VREFN 0x5 |
| VREFN. More... | |
| #define | XADCPS_CH_VBRAM 0x6 |
| On-chip VBRAM Data Reg, 7 series. More... | |
| #define | XADCPS_CH_SUPPLY_CALIB 0x07 |
| Supply Calib Data Reg. More... | |
| #define | XADCPS_CH_ADC_CALIB 0x08 |
| ADC Offset Channel Reg. More... | |
| #define | XADCPS_CH_GAINERR_CALIB 0x09 |
| Gain Error Channel Reg. More... | |
| #define | XADCPS_CH_VCCPINT 0x0D |
| On-chip PS VCCPINT Channel , Zynq. More... | |
| #define | XADCPS_CH_VCCPAUX 0x0E |
| On-chip PS VCCPAUX Channel , Zynq. More... | |
| #define | XADCPS_CH_VCCPDRO 0x0F |
| On-chip PS VCCPDRO Channel , Zynq. More... | |
| #define | XADCPS_CH_AUX_MIN 16 |
| Channel number for 1st Aux Channel. More... | |
| #define | XADCPS_CH_AUX_MAX 31 |
| Channel number for Last Aux channel. More... | |
Indexes for reading the Calibration Coefficient Data. | |
| #define | XADCPS_CALIB_SUPPLY_COEFF 0 |
| Supply Offset Calib Coefficient. More... | |
| #define | XADCPS_CALIB_ADC_COEFF 1 |
| ADC Offset Calib Coefficient. More... | |
| #define | XADCPS_CALIB_GAIN_ERROR_COEFF 2 |
| Gain Error Calib Coefficient. More... | |
Indexes for reading the Minimum/Maximum Measurement Data. | |
| #define | XADCPS_MAX_TEMP 0 |
| Maximum Temperature Data. More... | |
| #define | XADCPS_MAX_VCCINT 1 |
| Maximum VCCINT Data. More... | |
| #define | XADCPS_MAX_VCCAUX 2 |
| Maximum VCCAUX Data. More... | |
| #define | XADCPS_MAX_VBRAM 3 |
| Maximum VBRAM Data. More... | |
| #define | XADCPS_MIN_TEMP 4 |
| Minimum Temperature Data. More... | |
| #define | XADCPS_MIN_VCCINT 5 |
| Minimum VCCINT Data. More... | |
| #define | XADCPS_MIN_VCCAUX 6 |
| Minimum VCCAUX Data. More... | |
| #define | XADCPS_MIN_VBRAM 7 |
| Minimum VBRAM Data. More... | |
| #define | XADCPS_MAX_VCCPINT 8 |
| Maximum VCCPINT Register , Zynq. More... | |
| #define | XADCPS_MAX_VCCPAUX 9 |
| Maximum VCCPAUX Register , Zynq. More... | |
| #define | XADCPS_MAX_VCCPDRO 0xA |
| Maximum VCCPDRO Register , Zynq. More... | |
| #define | XADCPS_MIN_VCCPINT 0xC |
| Minimum VCCPINT Register , Zynq. More... | |
| #define | XADCPS_MIN_VCCPAUX 0xD |
| Minimum VCCPAUX Register , Zynq. More... | |
| #define | XADCPS_MIN_VCCPDRO 0xE |
| Minimum VCCPDRO Register , Zynq. More... | |
Alarm Threshold(Limit) Register (ATR) indexes. | |
| #define | XADCPS_ATR_TEMP_UPPER 0 |
| High user Temperature. More... | |
| #define | XADCPS_ATR_VCCINT_UPPER 1 |
| VCCINT high voltage limit register. More... | |
| #define | XADCPS_ATR_VCCAUX_UPPER 2 |
| VCCAUX high voltage limit register. More... | |
| #define | XADCPS_ATR_OT_UPPER 3 |
| VCCAUX high voltage limit register. More... | |
| #define | XADCPS_ATR_TEMP_LOWER 4 |
| Upper Over Temperature limit Reg. More... | |
| #define | XADCPS_ATR_VCCINT_LOWER 5 |
| VCCINT high voltage limit register. More... | |
| #define | XADCPS_ATR_VCCAUX_LOWER 6 |
| VCCAUX low voltage limit register. More... | |
| #define | XADCPS_ATR_OT_LOWER 7 |
| Lower Over Temperature limit. More... | |
| #define | XADCPS_ATR_VBRAM_UPPER_ 8 |
| VRBAM Upper Alarm Reg, 7 Series. More... | |
| #define | XADCPS_ATR_VCCPINT_UPPER 9 |
| VCCPINT Upper Alarm Reg, Zynq. More... | |
| #define | XADCPS_ATR_VCCPAUX_UPPER 0xA |
| VCCPAUX Upper Alarm Reg, Zynq. More... | |
| #define | XADCPS_ATR_VCCPDRO_UPPER 0xB |
| VCCPDRO Upper Alarm Reg, Zynq. More... | |
| #define | XADCPS_ATR_VBRAM_LOWER 0xC |
| VRBAM Lower Alarm Reg, 7 Series. More... | |
| #define | XADCPS_ATR_VCCPINT_LOWER 0xD |
| VCCPINT Lower Alarm Reg , Zynq. More... | |
| #define | XADCPS_ATR_VCCPAUX_LOWER 0xE |
| VCCPAUX Lower Alarm Reg , Zynq. More... | |
| #define | XADCPS_ATR_VCCPDRO_LOWER 0xF |
| VCCPDRO Lower Alarm Reg , Zynq. More... | |
Averaging to be done for the channels. | |
| #define | XADCPS_AVG_0_SAMPLES 0 |
| No Averaging. More... | |
| #define | XADCPS_AVG_16_SAMPLES 1 |
| Average 16 samples. More... | |
| #define | XADCPS_AVG_64_SAMPLES 2 |
| Average 64 samples. More... | |
| #define | XADCPS_AVG_256_SAMPLES 3 |
| Average 256 samples. More... | |
Channel Sequencer Modes of operation | |
| #define | XADCPS_SEQ_MODE_SAFE 0 |
| Default Safe Mode. More... | |
| #define | XADCPS_SEQ_MODE_ONEPASS 1 |
| Onepass through Sequencer. More... | |
| #define | XADCPS_SEQ_MODE_CONTINPASS 2 |
| Continuous Cycling Sequencer. More... | |
| #define | XADCPS_SEQ_MODE_SINGCHAN 3 |
| Single channel -No Sequencing. More... | |
| #define | XADCPS_SEQ_MODE_SIMUL_SAMPLING 4 |
| Simultaneous sampling. More... | |
| #define | XADCPS_SEQ_MODE_INDEPENDENT 8 |
| Independent mode. More... | |
Power Down Modes | |
| #define | XADCPS_PD_MODE_NONE 0 |
| No Power Down. More... | |
| #define | XADCPS_PD_MODE_ADCB 1 |
| Power Down ADC B. More... | |
| #define | XADCPS_PD_MODE_XADC 2 |
| Power Down ADC A and ADC B. More... | |
Functions | |
| XAdcPs_Config * | XAdcPs_LookupConfig (u16 DeviceId) |
| Functions in xadcps_sinit.c. More... | |
| int | XAdcPs_CfgInitialize (XAdcPs *InstancePtr, XAdcPs_Config *ConfigPtr, u32 EffectiveAddr) |
| This function initializes a specific XAdcPs device/instance. More... | |
| void | XAdcPs_Reset (XAdcPs *InstancePtr) |
| This function resets the XADC Hard Macro in the device. More... | |
| u16 | XAdcPs_GetAdcData (XAdcPs *InstancePtr, u8 Channel) |
| Get the ADC converted data for the specified channel. More... | |
| u16 | XAdcPs_GetCalibCoefficient (XAdcPs *InstancePtr, u8 CoeffType) |
| This function gets the calibration coefficient data for the specified parameter. More... | |
| u16 | XAdcPs_GetMinMaxMeasurement (XAdcPs *InstancePtr, u8 MeasurementType) |
| This function reads the Minimum/Maximum measurement for one of the specified parameters. More... | |
| void | XAdcPs_SetAvg (XAdcPs *InstancePtr, u8 Average) |
| 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. More... | |
| u8 | XAdcPs_GetAvg (XAdcPs *InstancePtr) |
| This function returns the number of samples of averaging configured for all the channels in the Configuration Register 0. More... | |
| int | XAdcPs_SetSingleChParams (XAdcPs *InstancePtr, u8 Channel, int IncreaseAcqCycles, int IsEventMode, int IsDifferentialMode) |
| The function sets the given parameters in the Configuration Register 0 in the single channel mode. More... | |
| void | XAdcPs_SetAlarmEnables (XAdcPs *InstancePtr, u16 AlmEnableMask) |
| This function enables the alarm outputs for the specified alarms in the Configuration Register 1. More... | |
| u16 | XAdcPs_GetAlarmEnables (XAdcPs *InstancePtr) |
| This function gets the status of the alarm output enables in the Configuration Register 1. More... | |
| void | XAdcPs_SetCalibEnables (XAdcPs *InstancePtr, u16 Calibration) |
| This function enables the specified calibration in the Configuration Register 1 : More... | |
| u16 | XAdcPs_GetCalibEnables (XAdcPs *InstancePtr) |
| This function reads the value of the calibration enables from the Configuration Register 1. More... | |
| void | XAdcPs_SetSequencerMode (XAdcPs *InstancePtr, u8 SequencerMode) |
| This function sets the specified Channel Sequencer Mode in the Configuration Register 1 : More... | |
| u8 | XAdcPs_GetSequencerMode (XAdcPs *InstancePtr) |
| This function gets the channel sequencer mode from the Configuration Register 1. More... | |
| void | XAdcPs_SetAdcClkDivisor (XAdcPs *InstancePtr, u8 Divisor) |
| The function sets the frequency of the ADCCLK by configuring the DCLK to ADCCLK ratio in the Configuration Register #2. More... | |
| u8 | XAdcPs_GetAdcClkDivisor (XAdcPs *InstancePtr) |
| The function gets the ADCCLK divisor from the Configuration Register 2. More... | |
| int | XAdcPs_SetSeqChEnables (XAdcPs *InstancePtr, u32 ChEnableMask) |
| This function enables the specified channels in the ADC Channel Selection Sequencer Registers. More... | |
| u32 | XAdcPs_GetSeqChEnables (XAdcPs *InstancePtr) |
| This function gets the channel enable bits status from the ADC Channel Selection Sequencer Registers. More... | |
| int | XAdcPs_SetSeqAvgEnables (XAdcPs *InstancePtr, u32 AvgEnableChMask) |
| This function enables the averaging for the specified channels in the ADC Channel Averaging Enable Sequencer Registers. More... | |
| u32 | XAdcPs_GetSeqAvgEnables (XAdcPs *InstancePtr) |
| This function returns the channels for which the averaging has been enabled in the ADC Channel Averaging Enables Sequencer Registers. More... | |
| int | XAdcPs_SetSeqInputMode (XAdcPs *InstancePtr, u32 InputModeChMask) |
| This function sets the Analog input mode for the specified channels in the ADC Channel Analog-Input Mode Sequencer Registers. More... | |
| u32 | XAdcPs_GetSeqInputMode (XAdcPs *InstancePtr) |
| This function gets the Analog input mode for all the channels from the ADC Channel Analog-Input Mode Sequencer Registers. More... | |
| int | XAdcPs_SetSeqAcqTime (XAdcPs *InstancePtr, u32 AcqCyclesChMask) |
| This function sets the number of Acquisition cycles in the ADC Channel Acquisition Time Sequencer Registers. More... | |
| u32 | XAdcPs_GetSeqAcqTime (XAdcPs *InstancePtr) |
| This function gets the status of acquisition from the ADC Channel Acquisition Time Sequencer Registers. More... | |
| void | XAdcPs_SetAlarmThreshold (XAdcPs *InstancePtr, u8 AlarmThrReg, u16 Value) |
| This functions sets the contents of the given Alarm Threshold Register. More... | |
| u16 | XAdcPs_GetAlarmThreshold (XAdcPs *InstancePtr, u8 AlarmThrReg) |
| This function returns the contents of the specified Alarm Threshold Register. More... | |
| void | XAdcPs_EnableUserOverTemp (XAdcPs *InstancePtr) |
| This function enables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register. More... | |
| void | XAdcPs_DisableUserOverTemp (XAdcPs *InstancePtr) |
| This function disables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register. More... | |
| void | XAdcPs_SetSequencerEvent (XAdcPs *InstancePtr, int IsEventMode) |
| The function enables the Event mode or Continuous mode in the sequencer mode. More... | |
| int | XAdcPs_GetSamplingMode (XAdcPs *InstancePtr) |
| This function returns the sampling mode. More... | |
| void | XAdcPs_SetMuxMode (XAdcPs *InstancePtr, int MuxMode, u8 Channel) |
| This function sets the External Mux mode. More... | |
| void | XAdcPs_SetPowerdownMode (XAdcPs *InstancePtr, u32 Mode) |
| This function sets the Power Down mode. More... | |
| u32 | XAdcPs_GetPowerdownMode (XAdcPs *InstancePtr) |
| This function gets the Power Down mode. More... | |
| int | XAdcPs_SelfTest (XAdcPs *InstancePtr) |
| Functions in xadcps_selftest.c. More... | |
| void | XAdcPs_IntrEnable (XAdcPs *InstancePtr, u32 Mask) |
| Functions in xadcps_intr.c. More... | |
| void | XAdcPs_IntrDisable (XAdcPs *InstancePtr, u32 Mask) |
| This function disables the specified interrupts in the device. More... | |
| u32 | XAdcPs_IntrGetEnabled (XAdcPs *InstancePtr) |
| This function returns the enabled interrupts read from the Interrupt Mask Register (IPIER). More... | |
| u32 | XAdcPs_IntrGetStatus (XAdcPs *InstancePtr) |
| This function returns the interrupt status read from Interrupt Status Register(IPISR). More... | |
| void | XAdcPs_IntrClear (XAdcPs *InstancePtr, u32 Mask) |
| This function clears the specified interrupts in the Interrupt Status Register (IPISR). More... | |