]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo_bsp/ps7_cortexa9_0/libsrc/xadcps_v2_0/src/xadcps.h
Preparing for next release...
[freertos] / FreeRTOS / Demo / CORTEX_A9_Zynq_ZC702 / RTOSDemo_bsp / ps7_cortexa9_0 / libsrc / xadcps_v2_0 / src / xadcps.h
1 /******************************************************************************
2 *
3 * Copyright (C) 2011 - 2014 Xilinx, Inc.  All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
30 *
31 ******************************************************************************/
32 /****************************************************************************/
33 /**
34 *
35 * @file xadcps.h
36 *
37 * The XAdcPs driver supports the Xilinx XADC/ADC device.
38 *
39 * The XADC/ADC device has the following features:
40 *       - 10-bit, 200-KSPS (kilo samples per second)
41 *               Analog-to-Digital Converter (ADC)
42 *       - Monitoring of on-chip supply voltages and temperature
43 *       - 1 dedicated differential analog-input pair and
44 *         16 auxiliary differential analog-input pairs
45 *       - Automatic alarms based on user defined limits for the on-chip
46 *         supply voltages and temperature
47 *       - Automatic Channel Sequencer, programmable averaging, programmable
48 *         acquisition time for the external inputs, unipolar or differential
49 *         input selection for the external inputs
50 *       - Inbuilt Calibration
51 *       - Optional interrupt request generation
52 *
53 *
54 * The user should refer to the hardware device specification for detailed
55 * information about the device.
56 *
57 * This header file contains the prototypes of driver functions that can
58 * be used to access the XADC/ADC device.
59 *
60 *
61 * <b> XADC Channel Sequencer Modes </b>
62 *
63 * The  XADC Channel Sequencer supports the following operating modes:
64 *
65 *   - <b> Default </b>: This is the default mode after power up.
66 *               In this mode of operation the XADC operates in
67 *               a sequence mode, monitoring the on chip sensors:
68 *               Temperature, VCCINT, and VCCAUX.
69 *   - <b> One pass through sequence </b>: In this mode the XADC
70 *               converts the channels enabled in the Sequencer Channel Enable
71 *               registers for a single pass and then stops.
72 *   - <b> Continuous cycling of sequence </b>: In this mode the XADC
73 *               converts the channels enabled in the Sequencer Channel Enable
74 *               registers continuously.
75 *   - <b> Single channel mode</b>: In this mode the XADC Channel
76 *               Sequencer is disabled and the XADC operates in a
77 *               Single Channel Mode.
78 *               The XADC can operate either in a Continuous or Event
79 *               driven sampling mode in the single channel mode.
80 *   - <b> Simultaneous Sampling Mode</b>: In this mode the XADC Channel
81 *               Sequencer will automatically sequence through eight fixed pairs
82 *               of auxiliary analog input channels for simulataneous conversion.
83 *   - <b> Independent ADC mode</b>: In this mode the first ADC (A) is used to
84 *               is used to implement a fixed monitoring mode similar to the
85 *               default mode but the alarm fucntions ar eenabled.
86 *               The second ADC (B) is available to be used with external analog
87 *               input channels only.
88 *
89 * Read the XADC spec for more information about the sequencer modes.
90 *
91 * <b> Initialization and Configuration </b>
92 *
93 * The device driver enables higher layer software (e.g., an application) to
94 * communicate to the XADC/ADC device.
95 *
96 * XAdcPs_CfgInitialize() API is used to initialize the XADC/ADC
97 * device. The user needs to first call the XAdcPs_LookupConfig() API which
98 * returns the Configuration structure pointer which is passed as a parameter to
99 * the XAdcPs_CfgInitialize() API.
100 *
101 *
102 * <b>Interrupts</b>
103 *
104 * The XADC/ADC device supports interrupt driven mode and the default
105 * operation mode is polling mode.
106 *
107 * The interrupt mode is available only if hardware is configured to support
108 * interrupts.
109 *
110 * This driver does not provide a Interrupt Service Routine (ISR) for the device.
111 * It is the responsibility of the application to provide one if needed. Refer to
112 * the interrupt example provided with this driver for details on using the
113 * device in interrupt mode.
114 *
115 *
116 * <b> Virtual Memory </b>
117 *
118 * This driver supports Virtual Memory. The RTOS is responsible for calculating
119 * the correct device base address in Virtual Memory space.
120 *
121 *
122 * <b> Threads </b>
123 *
124 * This driver is not thread safe. Any needs for threads or thread mutual
125 * exclusion must be satisfied by the layer above this driver.
126 *
127 *
128 * <b> Asserts </b>
129 *
130 * Asserts are used within all Xilinx drivers to enforce constraints on argument
131 * values. Asserts can be turned off on a system-wide basis by defining, at
132 * compile time, the NDEBUG identifier. By default, asserts are turned on and it
133 * is recommended that users leave asserts on during development.
134 *
135 *
136 * <b> Building the driver </b>
137 *
138 * The XAdcPs driver is composed of several source files. This allows the user
139 * to build and link only those parts of the driver that are necessary.
140 *
141 * <b> Limitations of the driver </b>
142 *
143 * XADC/ADC device can be accessed through the JTAG port and the PLB
144 * interface. The driver implementation does not support the simultaneous access
145 * of the device by both these interfaces. The user has to care of this situation
146 * in the user application code.
147 *
148 * <br><br>
149 *
150 * <pre>
151 *
152 * MODIFICATION HISTORY:
153 *
154 * Ver   Who    Date     Changes
155 * ----- -----  -------- -----------------------------------------------------
156 * 1.00a ssb    12/22/11 First release based on the XPS/AXI xadc driver
157 * 1.01a bss    02/18/13 Modified XAdcPs_SetSeqChEnables,XAdcPs_SetSeqAvgEnables
158 *                       XAdcPs_SetSeqInputMode and XAdcPs_SetSeqAcqTime APIs
159 *                       in xadcps.c to fix CR #693371
160 * 1.03a bss    11/01/13 Modified xadcps_hw.h to use correct Register offsets
161 *                       CR#749687
162 * </pre>
163 *
164 *****************************************************************************/
165 #ifndef XADCPS_H /* Prevent circular inclusions */
166 #define XADCPS_H /* by using protection macros  */
167
168 #ifdef __cplusplus
169 extern "C" {
170 #endif
171
172 /***************************** Include Files ********************************/
173
174 #include "xil_types.h"
175 #include "xil_assert.h"
176 #include "xstatus.h"
177 #include "xadcps_hw.h"
178
179 /************************** Constant Definitions ****************************/
180
181
182 /**
183  * @name Indexes for the different channels.
184  * @{
185  */
186 #define XADCPS_CH_TEMP          0x0  /**< On Chip Temperature */
187 #define XADCPS_CH_VCCINT        0x1  /**< VCCINT */
188 #define XADCPS_CH_VCCAUX        0x2  /**< VCCAUX */
189 #define XADCPS_CH_VPVN          0x3  /**< VP/VN Dedicated analog inputs */
190 #define XADCPS_CH_VREFP         0x4  /**< VREFP */
191 #define XADCPS_CH_VREFN         0x5  /**< VREFN */
192 #define XADCPS_CH_VBRAM         0x6  /**< On-chip VBRAM Data Reg, 7 series */
193 #define XADCPS_CH_SUPPLY_CALIB  0x07 /**< Supply Calib Data Reg */
194 #define XADCPS_CH_ADC_CALIB     0x08 /**< ADC Offset Channel Reg */
195 #define XADCPS_CH_GAINERR_CALIB 0x09 /**< Gain Error Channel Reg  */
196 #define XADCPS_CH_VCCPINT       0x0D /**< On-chip PS VCCPINT Channel , Zynq */
197 #define XADCPS_CH_VCCPAUX       0x0E /**< On-chip PS VCCPAUX Channel , Zynq */
198 #define XADCPS_CH_VCCPDRO       0x0F /**< On-chip PS VCCPDRO Channel , Zynq */
199 #define XADCPS_CH_AUX_MIN        16 /**< Channel number for 1st Aux Channel */
200 #define XADCPS_CH_AUX_MAX        31 /**< Channel number for Last Aux channel */
201
202 /*@}*/
203
204
205 /**
206  * @name Indexes for reading the Calibration Coefficient Data.
207  * @{
208  */
209 #define XADCPS_CALIB_SUPPLY_COEFF     0 /**< Supply Offset Calib Coefficient */
210 #define XADCPS_CALIB_ADC_COEFF        1 /**< ADC Offset Calib Coefficient */
211 #define XADCPS_CALIB_GAIN_ERROR_COEFF 2 /**< Gain Error Calib Coefficient*/
212 /*@}*/
213
214
215 /**
216  * @name Indexes for reading the Minimum/Maximum Measurement Data.
217  * @{
218  */
219 #define XADCPS_MAX_TEMP         0 /**< Maximum Temperature Data */
220 #define XADCPS_MAX_VCCINT       1 /**< Maximum VCCINT Data */
221 #define XADCPS_MAX_VCCAUX       2 /**< Maximum VCCAUX Data */
222 #define XADCPS_MAX_VBRAM        3 /**< Maximum VBRAM Data */
223 #define XADCPS_MIN_TEMP         4 /**< Minimum Temperature Data */
224 #define XADCPS_MIN_VCCINT       5 /**< Minimum VCCINT Data */
225 #define XADCPS_MIN_VCCAUX       6 /**< Minimum VCCAUX Data */
226 #define XADCPS_MIN_VBRAM        7 /**< Minimum VBRAM Data */
227 #define XADCPS_MAX_VCCPINT      8 /**< Maximum VCCPINT Register , Zynq */
228 #define XADCPS_MAX_VCCPAUX      9 /**< Maximum VCCPAUX Register , Zynq */
229 #define XADCPS_MAX_VCCPDRO      0xA /**< Maximum VCCPDRO Register , Zynq */
230 #define XADCPS_MIN_VCCPINT      0xC /**< Minimum VCCPINT Register , Zynq */
231 #define XADCPS_MIN_VCCPAUX      0xD /**< Minimum VCCPAUX Register , Zynq */
232 #define XADCPS_MIN_VCCPDRO      0xE /**< Minimum VCCPDRO Register , Zynq */
233
234 /*@}*/
235
236
237 /**
238  * @name Alarm Threshold(Limit) Register (ATR) indexes.
239  * @{
240  */
241 #define XADCPS_ATR_TEMP_UPPER    0 /**< High user Temperature */
242 #define XADCPS_ATR_VCCINT_UPPER  1 /**< VCCINT high voltage limit register */
243 #define XADCPS_ATR_VCCAUX_UPPER  2 /**< VCCAUX high voltage limit register */
244 #define XADCPS_ATR_OT_UPPER      3 /**< VCCAUX high voltage limit register */
245 #define XADCPS_ATR_TEMP_LOWER    4 /**< Upper Over Temperature limit Reg */
246 #define XADCPS_ATR_VCCINT_LOWER  5 /**< VCCINT high voltage limit register */
247 #define XADCPS_ATR_VCCAUX_LOWER  6 /**< VCCAUX low voltage limit register  */
248 #define XADCPS_ATR_OT_LOWER      7 /**< Lower Over Temperature limit */
249 #define XADCPS_ATR_VBRAM_UPPER_  8 /**< VRBAM Upper Alarm Reg, 7 Series */
250 #define XADCPS_ATR_VCCPINT_UPPER 9 /**< VCCPINT Upper Alarm Reg, Zynq */
251 #define XADCPS_ATR_VCCPAUX_UPPER 0xA /**< VCCPAUX Upper Alarm Reg, Zynq */
252 #define XADCPS_ATR_VCCPDRO_UPPER 0xB /**< VCCPDRO Upper Alarm Reg, Zynq */
253 #define XADCPS_ATR_VBRAM_LOWER   0xC /**< VRBAM Lower Alarm Reg, 7 Series */
254 #define XADCPS_ATR_VCCPINT_LOWER 0xD /**< VCCPINT Lower Alarm Reg , Zynq */
255 #define XADCPS_ATR_VCCPAUX_LOWER 0xE /**< VCCPAUX Lower Alarm Reg , Zynq */
256 #define XADCPS_ATR_VCCPDRO_LOWER 0xF /**< VCCPDRO Lower Alarm Reg , Zynq */
257
258 /*@}*/
259
260
261 /**
262  * @name Averaging to be done for the channels.
263  * @{
264  */
265 #define XADCPS_AVG_0_SAMPLES    0  /**< No Averaging */
266 #define XADCPS_AVG_16_SAMPLES   1  /**< Average 16 samples */
267 #define XADCPS_AVG_64_SAMPLES   2  /**< Average 64 samples */
268 #define XADCPS_AVG_256_SAMPLES  3  /**< Average 256 samples */
269
270 /*@}*/
271
272
273 /**
274  * @name Channel Sequencer Modes of operation
275  * @{
276  */
277 #define XADCPS_SEQ_MODE_SAFE            0  /**< Default Safe Mode */
278 #define XADCPS_SEQ_MODE_ONEPASS         1  /**< Onepass through Sequencer */
279 #define XADCPS_SEQ_MODE_CONTINPASS      2  /**< Continuous Cycling Sequencer */
280 #define XADCPS_SEQ_MODE_SINGCHAN        3  /**< Single channel -No Sequencing */
281 #define XADCPS_SEQ_MODE_SIMUL_SAMPLING  4  /**< Simultaneous sampling */
282 #define XADCPS_SEQ_MODE_INDEPENDENT     8  /**< Independent mode */
283
284 /*@}*/
285
286
287
288 /**
289  * @name Power Down Modes
290  * @{
291  */
292 #define XADCPS_PD_MODE_NONE             0  /**< No Power Down  */
293 #define XADCPS_PD_MODE_ADCB             1  /**< Power Down ADC B */
294 #define XADCPS_PD_MODE_XADC             2  /**< Power Down ADC A and ADC B */
295 /*@}*/
296
297 /**************************** Type Definitions ******************************/
298
299 /**
300  * This typedef contains configuration information for the XADC/ADC
301  * device.
302  */
303 typedef struct {
304         u16  DeviceId;          /**< Unique ID of device */
305         u32  BaseAddress;       /**< Device base address */
306 } XAdcPs_Config;
307
308
309 /**
310  * The driver's instance data. The user is required to allocate a variable
311  * of this type for every XADC/ADC device in the system. A pointer to
312  * a variable of this type is then passed to the driver API functions.
313  */
314 typedef struct {
315         XAdcPs_Config Config;   /**< XAdcPs_Config of current device */
316         u32  IsReady;           /**< Device is initialized and ready  */
317
318 } XAdcPs;
319
320 /***************** Macros (Inline Functions) Definitions ********************/
321
322 /****************************************************************************/
323 /**
324 *
325 * This macro checks if the XADC device is in Event Sampling mode.
326 *
327 * @param        InstancePtr is a pointer to the XAdcPs instance.
328 *
329 * @return
330 *               - TRUE if the device is in Event Sampling Mode.
331 *               - FALSE if the device is in Continuous Sampling Mode.
332 *
333 * @note         C-Style signature:
334 *               int XAdcPs_IsEventSamplingMode(XAdcPs *InstancePtr);
335 *
336 *****************************************************************************/
337 #define XAdcPs_IsEventSamplingModeSet(InstancePtr)                      \
338         (((XAdcPs_ReadInternalReg(InstancePtr,                          \
339                         XADCPS_CFR0_OFFSET) & XADCPS_CFR0_EC_MASK) ?    \
340                         TRUE : FALSE))
341
342
343 /****************************************************************************/
344 /**
345 *
346 * This macro checks if the XADC device is in External Mux mode.
347 *
348 * @param        InstancePtr is a pointer to the XAdcPs instance.
349 *
350 * @return
351 *               - TRUE if the device is in External Mux Mode.
352 *               - FALSE if the device is NOT in External Mux Mode.
353 *
354 * @note         C-Style signature:
355 *               int XAdcPs_IsExternalMuxMode(XAdcPs *InstancePtr);
356 *
357 *****************************************************************************/
358 #define XAdcPs_IsExternalMuxModeSet(InstancePtr)                        \
359         (((XAdcPs_ReadInternalReg(InstancePtr,                          \
360                         XADCPS_CFR0_OFFSET) & XADCPS_CFR0_MUX_MASK) ?   \
361                         TRUE : FALSE))
362
363 /****************************************************************************/
364 /**
365 *
366 * This macro converts XADC Raw Data to Temperature(centigrades).
367 *
368 * @param        AdcData is the Raw ADC Data from XADC.
369 *
370 * @return       The Temperature in centigrades.
371 *
372 * @note         C-Style signature:
373 *               float XAdcPs_RawToTemperature(u32 AdcData);
374 *
375 *****************************************************************************/
376 #define XAdcPs_RawToTemperature(AdcData)                                \
377         ((((float)(AdcData)/65536.0f)/0.00198421639f ) - 273.15f)
378
379 /****************************************************************************/
380 /**
381 *
382 * This macro converts XADC/ADC Raw Data to Voltage(volts).
383 *
384 * @param        AdcData is the XADC/ADC Raw Data.
385 *
386 * @return       The Voltage in volts.
387 *
388 * @note         C-Style signature:
389 *               float XAdcPs_RawToVoltage(u32 AdcData);
390 *
391 *****************************************************************************/
392 #define XAdcPs_RawToVoltage(AdcData)                                    \
393         ((((float)(AdcData))* (3.0f))/65536.0f)
394
395 /****************************************************************************/
396 /**
397 *
398 * This macro converts Temperature in centigrades to XADC/ADC Raw Data.
399 *
400 * @param        Temperature is the Temperature in centigrades to be
401 *               converted to XADC/ADC Raw Data.
402 *
403 * @return       The XADC/ADC Raw Data.
404 *
405 * @note         C-Style signature:
406 *               int XAdcPs_TemperatureToRaw(float Temperature);
407 *
408 *****************************************************************************/
409 #define XAdcPs_TemperatureToRaw(Temperature)                            \
410         ((int)(((Temperature) + 273.15f)*65536.0f*0.00198421639f))
411
412 /****************************************************************************/
413 /**
414 *
415 * This macro converts Voltage in Volts to XADC/ADC Raw Data.
416 *
417 * @param        Voltage is the Voltage in volts to be converted to
418 *               XADC/ADC Raw Data.
419 *
420 * @return       The XADC/ADC Raw Data.
421 *
422 * @note         C-Style signature:
423 *               int XAdcPs_VoltageToRaw(float Voltage);
424 *
425 *****************************************************************************/
426 #define XAdcPs_VoltageToRaw(Voltage)                                    \
427         ((int)((Voltage)*65536.0f/3.0f))
428
429
430 /****************************************************************************/
431 /**
432 *
433 * This macro is used for writing to the XADC Registers using the
434 * command FIFO.
435 *
436 * @param        InstancePtr is a pointer to the XAdcPs instance.
437 *
438 * @return       None.
439 *
440 * @note         C-Style signature:
441 *               void XAdcPs_WriteFifo(XAdcPs *InstancePtr, u32 Data);
442 *
443 *****************************************************************************/
444 #define XAdcPs_WriteFifo(InstancePtr, Data)                             \
445         XAdcPs_WriteReg((InstancePtr)->Config.BaseAddress,              \
446                           XADCPS_CMDFIFO_OFFSET, Data);
447
448
449 /****************************************************************************/
450 /**
451 *
452 * This macro is used for reading from the XADC Registers using the
453 * data FIFO.
454 *
455 * @param        InstancePtr is a pointer to the XAdcPs instance.
456 *
457 * @return       Data read from the FIFO
458 *
459 * @note         C-Style signature:
460 *               u32 XAdcPs_ReadFifo(XAdcPs *InstancePtr);
461 *
462 *****************************************************************************/
463 #define XAdcPs_ReadFifo(InstancePtr)                            \
464         XAdcPs_ReadReg((InstancePtr)->Config.BaseAddress,       \
465                           XADCPS_RDFIFO_OFFSET);
466
467
468 /************************** Function Prototypes *****************************/
469
470
471
472 /**
473  * Functions in xadcps_sinit.c
474  */
475 XAdcPs_Config *XAdcPs_LookupConfig(u16 DeviceId);
476
477 /**
478  * Functions in xadcps.c
479  */
480 int XAdcPs_CfgInitialize(XAdcPs *InstancePtr,
481                                 XAdcPs_Config *ConfigPtr,
482                                 u32 EffectiveAddr);
483
484
485 u32 XAdcPs_GetStatus(XAdcPs *InstancePtr);
486
487 u32 XAdcPs_GetAlarmOutputStatus(XAdcPs *InstancePtr);
488
489 void XAdcPs_StartAdcConversion(XAdcPs *InstancePtr);
490
491 void XAdcPs_Reset(XAdcPs *InstancePtr);
492
493 u16 XAdcPs_GetAdcData(XAdcPs *InstancePtr, u8 Channel);
494
495 u16 XAdcPs_GetCalibCoefficient(XAdcPs *InstancePtr, u8 CoeffType);
496
497 u16 XAdcPs_GetMinMaxMeasurement(XAdcPs *InstancePtr, u8 MeasurementType);
498
499 void XAdcPs_SetAvg(XAdcPs *InstancePtr, u8 Average);
500 u8 XAdcPs_GetAvg(XAdcPs *InstancePtr);
501
502 int XAdcPs_SetSingleChParams(XAdcPs *InstancePtr,
503                                 u8 Channel,
504                                 int IncreaseAcqCycles,
505                                 int IsEventMode,
506                                 int IsDifferentialMode);
507
508
509 void XAdcPs_SetAlarmEnables(XAdcPs *InstancePtr, u16 AlmEnableMask);
510 u16 XAdcPs_GetAlarmEnables(XAdcPs *InstancePtr);
511
512 void XAdcPs_SetCalibEnables(XAdcPs *InstancePtr, u16 Calibration);
513 u16 XAdcPs_GetCalibEnables(XAdcPs *InstancePtr);
514
515 void XAdcPs_SetSequencerMode(XAdcPs *InstancePtr, u8 SequencerMode);
516 u8 XAdcPs_GetSequencerMode(XAdcPs *InstancePtr);
517
518 void XAdcPs_SetAdcClkDivisor(XAdcPs *InstancePtr, u8 Divisor);
519 u8 XAdcPs_GetAdcClkDivisor(XAdcPs *InstancePtr);
520
521 int XAdcPs_SetSeqChEnables(XAdcPs *InstancePtr, u32 ChEnableMask);
522 u32 XAdcPs_GetSeqChEnables(XAdcPs *InstancePtr);
523
524 int XAdcPs_SetSeqAvgEnables(XAdcPs *InstancePtr, u32 AvgEnableChMask);
525 u32 XAdcPs_GetSeqAvgEnables(XAdcPs *InstancePtr);
526
527 int XAdcPs_SetSeqInputMode(XAdcPs *InstancePtr, u32 InputModeChMask);
528 u32 XAdcPs_GetSeqInputMode(XAdcPs *InstancePtr);
529
530 int XAdcPs_SetSeqAcqTime(XAdcPs *InstancePtr, u32 AcqCyclesChMask);
531 u32 XAdcPs_GetSeqAcqTime(XAdcPs *InstancePtr);
532
533 void XAdcPs_SetAlarmThreshold(XAdcPs *InstancePtr, u8 AlarmThrReg, u16 Value);
534 u16 XAdcPs_GetAlarmThreshold(XAdcPs *InstancePtr, u8 AlarmThrReg);
535
536 void XAdcPs_EnableUserOverTemp(XAdcPs *InstancePtr);
537 void XAdcPs_DisableUserOverTemp(XAdcPs *InstancePtr);
538
539 /**
540  * Functions in xadcps_selftest.c
541  */
542 int XAdcPs_SelfTest(XAdcPs *InstancePtr);
543
544 /**
545  * Functions in xadcps_intr.c
546  */
547 void XAdcPs_IntrEnable(XAdcPs *InstancePtr, u32 Mask);
548 void XAdcPs_IntrDisable(XAdcPs *InstancePtr, u32 Mask);
549 u32 XAdcPs_IntrGetEnabled(XAdcPs *InstancePtr);
550
551 u32 XAdcPs_IntrGetStatus(XAdcPs *InstancePtr);
552 void XAdcPs_IntrClear(XAdcPs *InstancePtr, u32 Mask);
553
554
555 #ifdef __cplusplus
556 }
557 #endif
558
559 #endif  /* End of protection macro. */