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