iLLD_TC27xC  1.0
IfxDsadc_Dsadc.h
Go to the documentation of this file.
1 /**
2  * \file IfxDsadc_Dsadc.h
3  * \brief DSADC DSADC details
4  * \ingroup IfxLld_Dsadc
5  *
6  * \version iLLD_0_1_0_10
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  * \defgroup IfxLld_Dsadc_Dsadc_Usage How to use the DSADC Interface driver?
25  * \ingroup IfxLld_Dsadc
26  *
27  * The DSADC interface driver provides a default DSADC configuration for converting analog data streams inputs from external modulators via digital input channels, into digital values by using the on-chip demodulator channels.
28  *
29  * In the following sections it will be described, how to integrate the driver into the application framework.
30  *
31  * \section IfxLld_Dsadc_Dsadc_Preparation Preparation
32  * \subsection IfxLld_Dsadc_Dsadc_Include Include Files
33  *
34  * Include following header file into your C code:
35  * \code
36  * #include <Dsadc/Dsadc/IfxDsadc_Dsadc.h>
37  * #include <dsadc_commands.h>
38  * \endcode
39  *
40  * \subsection IfxLld_Dsadc_Dsadc_Variables Variables
41  *
42  * Declare the DSADC channel handle and available channels as global variables in your C code:
43  *
44  * \code
45  * static IfxDsadc_Dsadc dsadc;
46  *
47  * #if defined(DERIVATIVE_TC22x) || defined(DERIVATIVE_TC23x) || defined(DERIVATIVE_TC24x)
48  * uint8 dsadcChannelAvailable[IFXDSADC_NUM_CHANNELS] = { 1, 0, 0, 1 };
49  *
50  * #elif defined(DERIVATIVE_TC27x) || defined(DERIVATIVE_TC27xB) || defined(DERIVATIVE_TC27xC) || defined(DERIVATIVE_TC27xD)
51  * uint8 dsadcChannelAvailable[IFXDSADC_NUM_CHANNELS] = { 1, 1, 1, 1, 1, 1 };
52  *
53  * #elif defined(DERIVATIVE_TC26x) || defined(DERIVATIVE_TC26xB)
54  * uint8 dsadcChannelAvailable[IFXDSADC_NUM_CHANNELS] = { 1, 0, 1, 1 };
55  *
56  * #elif defined(DERIVATIVE_TC29x) || defined(DERIVATIVE_TC29xB)
57  * uint8 dsadcChannelAvailable[IFXDSADC_NUM_CHANNELS] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
58  *
59  * #else
60  * # error "Testcase not prepared for this derivative!"
61  * #endif
62  * \endcode
63  *
64  *
65  * \subsection IfxLld_Dsadc_Dsadc_Init Module Initialisation
66  *
67  * The module initialisation can be done in the same function. Here an example:
68  * \code
69  * // disable pull-up devices for analog pads of P00 (assigned to some analog pins)
70  * P00_IOCR0.U = 0x00000000;
71  * P00_IOCR4.U = 0x00000000;
72  * P00_IOCR8.U = 0x00000000;
73  * P00_IOCR12.U = 0x00000000;
74  *
75  * // create module config
76  * IfxDsadc_Dsadc_Config dsadcConfig;
77  * IfxDsadc_Dsadc_initModuleConfig(&dsadcConfig, &MODULE_DSADC);
78  *
79  * // initialize module
80  * IfxDsadc_Dsadc dsadc;
81  * IfxDsadc_Dsadc_initModule(&dsadc, &dsadcConfig);
82  *
83  * // create channel config
84  * IfxDsadc_Dsadc_ChannelConfig dsadcChannelConfig;
85  * IfxDsadc_Dsadc_initChannelConfig(&dsadcChannelConfig, &dsadc);
86  *
87  * // modify default configuration
88  * dsadcChannelConfig.modulator.positiveInput = IfxDsadc_InputConfig_inputPin;
89  * dsadcChannelConfig.modulator.negativeInput = IfxDsadc_InputConfig_inputPin;
90  * dsadcChannelConfig.modulator.inputGain = IfxDsadc_InputGain_factor1;
91  * dsadcChannelConfig.modulator.inputPin = IfxDsadc_InputPin_a;
92  * dsadcChannelConfig.modulator.modulatorClockFreq = 10.0e6;
93  * dsadcChannelConfig.modulator.commonModeVoltage = IfxDsadc_CommonModeVoltage_c;
94  *
95  * dsadcChannelConfig.combFilter.bypassed = FALSE;
96  * dsadcChannelConfig.combFilter.combFilterType = IfxDsadc_MainCombFilterType_comb3;
97  * dsadcChannelConfig.combFilter.combFilterShift = IfxDsadc_MainCombFilterShift_noShift;
98  * dsadcChannelConfig.combFilter.serviceRequest = IfxDsadc_MainServiceRequest_everyNewResult;
99  * dsadcChannelConfig.combFilter.decimationFactor = 32;
100  * dsadcChannelConfig.combFilter.startValue = 32;
101  *
102  * dsadcChannelConfig.firFilter.fir0Enabled = TRUE;
103  * dsadcChannelConfig.firFilter.fir1Enabled = TRUE;
104  * dsadcChannelConfig.firFilter.offsetCompensation = FALSE;
105  * dsadcChannelConfig.firFilter.dataShift = IfxDsadc_FirDataShift_shiftBy2;
106  * dsadcChannelConfig.firFilter.internalShift = IfxDsadc_FirInternalShift_shiftBy1;
107  *
108  *
109  * // initialize channels
110  * for(int chn=0; chn<IFXDSADC_NUM_CHANNELS; ++chn) {
111  * if( dsadcChannelAvailable[chn] ) {
112  * dsadcChannelConfig.channelId = (IfxDsadc_ChannelId)chn;
113  *
114  * IfxDsadc_Dsadc_initChannel(&dsadcChannel[chn], &dsadcChannelConfig);
115  * }
116  * }
117  * \endcode
118  *
119  * The DSADC is ready for use now!
120  *
121  *
122  * \section IfxLld_Dsadc_Dsadc_Conversions Conversions
123  *
124  * The DSADC driver provides simple to use Conversion function,
125  *
126  * \code
127  * // start conversions
128  * IfxDsadc_Dsadc_startScan(&dsadc, 0x3f, 0x3f);
129  *
130  * // results are now available in IFXDSADC(ds).CH[x].RESM.B.RESULT (x=0..5)
131  * \endcode
132  *
133  * The converted data can be collected using the following function
134  *
135  * \code
136  * // declared globally
137  * // sint16 result[];
138  *
139  * result = IfxDsadc_Dsadc_getMainResult(&dsadcChannel[chn]));
140  * \endcode
141  *
142  * \defgroup IfxLld_Dsadc_Dsadc Dsadc
143  * \ingroup IfxLld_Dsadc
144  * \defgroup IfxLld_Dsadc_Dsadc_DataStructures Data Structures
145  * \ingroup IfxLld_Dsadc_Dsadc
146  * \defgroup IfxLld_Dsadc_Dsadc_Module Module Functions
147  * \ingroup IfxLld_Dsadc_Dsadc
148  * \defgroup IfxLld_Dsadc_Dsadc_Channel Channel Functions
149  * \ingroup IfxLld_Dsadc_Dsadc
150  * \defgroup IfxLld_Dsadc_Dsadc_Operative Operative Functions
151  * \ingroup IfxLld_Dsadc_Dsadc
152  * \defgroup IfxLld_Dsadc_Dsadc_Results Result Functions
153  * \ingroup IfxLld_Dsadc_Dsadc
154  * \defgroup IfxLld_Dsadc_Dsadc_Interrupt Interrupt Functions
155  * \ingroup IfxLld_Dsadc_Dsadc
156  */
157 
158 #ifndef IFXDSADC_DSADC_H
159 #define IFXDSADC_DSADC_H 1
160 
161 /******************************************************************************/
162 /*----------------------------------Includes----------------------------------*/
163 /******************************************************************************/
164 
165 #include "Dsadc/Std/IfxDsadc.h"
166 #include "Src/Std/IfxSrc.h"
167 
168 /******************************************************************************/
169 /*-----------------------------Data Structures--------------------------------*/
170 /******************************************************************************/
171 
172 /** \addtogroup IfxLld_Dsadc_Dsadc_DataStructures
173  * \{ */
174 /** \brief Auxiliary comb filter configuration structure
175  */
176 typedef struct
177 {
178  boolean bypassed;
179  IfxDsadc_AuxCombFilterType combFilterType; /**< \brief Comb Filter (auxiliary) configuration/type */
180  IfxDsadc_AuxCombFilterShift combFilterShift; /**< \brief Comb Filter (auxiliary) shift control */
181  IfxDsadc_AuxServiceRequest serviceRequest; /**< \brief Service request generation (auxiliary) */
182  IfxDsadc_AuxEvent eventSelect; /**< \brief Service request generation (auxiliary) */
183  IfxDsadc_AuxGate eventGate; /**< \brief Service request generation (auxiliary) */
184  uint8 decimationFactor; /**< \brief CIC Filter (Auxiliary) decimation factor (4 .. 32) */
186 
187 /** \brief Channel Pins Configuration structure
188  */
189 typedef struct
190 {
191  const IfxDsadc_Cin_In *cin; /**< \brief the CIN Pin which should be configured */
192  IfxPort_InputMode cinMode; /**< \brief the CIN pin input mode which should be configured */
193  const IfxDsadc_Din_In *din; /**< \brief the DIN Pin which should be configured */
194  IfxPort_InputMode dinMode; /**< \brief the DIN pin input mode which should be configured */
195  const IfxDsadc_Itr_In *itr; /**< \brief the ITR Pin which should be configured */
196  IfxPort_InputMode itrMode; /**< \brief the ITR pin input mode which should be configured */
197  const IfxDsadc_Dsn_In *dsn; /**< \brief the DSN Pin which should be configured */
198  IfxPort_InputMode dsnMode; /**< \brief the DSN pin output mode which should be configured */
199  const IfxDsadc_Dsp_In *dsp; /**< \brief the DSP Pin which should be configured */
200  IfxPort_InputMode dspMode; /**< \brief the DSP pin output mode which should be configured */
202 
203 /** \brief Comb filter configuration structure
204  */
205 typedef struct
206 {
207  boolean bypassed; /**< \brief CIC Filter enable/bypass selection */
208  IfxDsadc_MainCombFilterType combFilterType; /**< \brief Comb Filter (Main Chain) configuration/type */
209  IfxDsadc_MainCombFilterShift combFilterShift; /**< \brief Comb Filter (Main Chain) shift control */
210  IfxDsadc_MainServiceRequest serviceRequest; /**< \brief Service request generation (main chain) */
211  uint16 decimationFactor; /**< \brief 4 .. 256 */
212  uint16 startValue; /**< \brief 4 .. decimationFactor */
214 
215 /** \brief Demodulator configuration structure
216  */
217 typedef struct
218 {
219  IfxDsadc_InputDataSource inputDataSource; /**< \brief Demodulator input data source selection */
220  IfxDsadc_TriggerInput triggerInput; /**< \brief Trigger selection */
221  IfxDsadc_IntegratorTrigger integrationTrigger; /**< \brief Integrator trigger mode selection */
222  IfxDsadc_TimestampTrigger timestampTrigger; /**< \brief Timestamp trigger mode selection */
223  IfxDsadc_SampleClockSource sampleClockSource; /**< \brief Demodulator sample clock source selection */
224  IfxDsadc_SampleStrobe sampleStrobe; /**< \brief Demodulator data strobe generation mode selection */
226 
227 /** \brief FIR filters configuration structure
228  */
229 typedef struct
230 {
231  boolean fir0Enabled; /**< \brief FIR filter 0 enable/disable selection */
232  boolean fir1Enabled; /**< \brief FIR filter 0 enable/disable selection */
233  boolean offsetCompensation; /**< \brief Offset Compensation Filter enable/disable selection */
234  IfxDsadc_FirDataShift dataShift; /**< \brief FIR data shift control selection */
235  IfxDsadc_FirInternalShift internalShift; /**< \brief FIR shift control selction */
237 
238 /** \brief Integrator configuration structure
239  */
240 typedef struct
241 {
242  IfxDsadc_IntegrationWindowSize windowSize; /**< \brief Integrator window size */
243  uint16 discardCount; /**< \brief Number of discarded values to after active trigger: 1 .. 64 */
244  uint16 integrationCount; /**< \brief Number of integrated values after discard step: 1 .. 64 */
245  uint16 integrationCycles; /**< \brief Number of integration cycles: 1 .. 16. Used only when \ref IfxDsadc_IntegrationWindowSize_internalControl */
247 
248 /** \brief Modulator configuration structure
249  */
250 typedef struct
251 {
252  IfxDsadc_InputConfig positiveInput; /**< \brief Modulator configuration of positive input line */
253  IfxDsadc_InputConfig negativeInput; /**< \brief Modulator configuration of negative input line */
254  IfxDsadc_InputGain inputGain; /**< \brief Modulator gain select of analog input path */
255  IfxDsadc_InputPin inputPin; /**< \brief Modulator input pin selection */
256  float32 modulatorClockFreq; /**< \brief Modulator clock frequency */
257  IfxDsadc_CommonModeVoltage commonModeVoltage; /**< \brief Modulator common mode voltage selection */
259 
260 /** \brief Rectifier configuration structure
261  */
262 typedef struct
263 {
264  boolean enabled; /**< \brief Rectification enable/disable selection */
265  IfxDsadc_RectifierSignSource signSource; /**< \brief Rectifier sign source */
266  uint8 signDelay; /**< \brief Sign delay value */
267  uint8 signPeriod; /**< \brief Sign period */
269 
270 /** \} */
271 
272 /** \addtogroup IfxLld_Dsadc_Dsadc_DataStructures
273  * \{ */
274 /** \brief DSADC handle data structure
275  */
276 typedef struct
277 {
278  Ifx_DSADC *dsadc; /**< \brief Specifies the pointer to the DSADC module registers */
280 
281 /** \brief Carrier generation configuration structure
282  */
283 typedef struct
284 {
285  IfxDsadc_CarrierWaveformMode carrierWaveformMode; /**< \brief Carrier generation mode */
286  boolean inverted; /**< \brief Signal polarity (Normal / Inverted) selection */
287  boolean bitReversed; /**< \brief Bit-Reverse PWM Generation (Normal / Bit reverse mode) selection */
288  float32 frequency; /**< \brief Expected excitation frequency */
289  const IfxDsadc_Cgpwm_Out *pinPos; /**< \brief Positive-carrier pin configuration */
290  const IfxDsadc_Cgpwm_Out *pinNeg; /**< \brief Negative-carrier pin configuration */
291  IfxPort_OutputMode pinMode; /**< \brief Carrier pins output mode */
292  IfxPort_PadDriver pinDriver; /**< \brief Carrier pins pad driver */
294 
295 /** \brief Channel handle structure
296  */
297 typedef struct
298 {
299  Ifx_DSADC *module; /**< \brief Specifies the pointer to the DSADC module registers */
300  Ifx_DSADC_CH *channel; /**< \brief Specifies the pointer to the DSADC channel registers */
301  IfxDsadc_ChannelId channelId; /**< \brief Channel Id */
303 
304 /** \brief Single channel configuration structure
305  */
306 typedef struct
307 {
308  Ifx_DSADC *module; /**< \brief Specifies the pointer to the DSADC module registers */
309  IfxDsadc_ChannelId channelId; /**< \brief Channel Id */
310  IfxDsadc_Dsadc_ModulatorConfig modulator; /**< \brief Modulator configuration structure */
311  IfxDsadc_Dsadc_DemodulatorConfig demodulator; /**< \brief Demodulator configuration structure */
312  IfxDsadc_Dsadc_CombFilterConfig combFilter; /**< \brief Comb filter configuration structure */
313  IfxDsadc_Dsadc_FirFilterConfig firFilter; /**< \brief FIR filters configuration structure */
314  IfxDsadc_Dsadc_IntegratorConfig integrator; /**< \brief Integrator configuration structure */
315  IfxDsadc_Dsadc_AuxFilterConfig auxFilter; /**< \brief Auxiliary comb filter configuration structure */
316  IfxDsadc_Dsadc_RectifierConfig rectifier; /**< \brief Rectifier configuration structure */
317  const IfxDsadc_Dsadc_ChannelPins *channelPins; /**< \brief Channel Pins Configuration structure */
319 
320 /** \brief Clock configuration data structure
321  */
322 typedef struct
323 {
324  Ifx_DSADC *dsadc; /**< \brief Specifies the pointer to the DSADC module registers */
325  IfxDsadc_ModulatorClock modulatorClockSelect; /**< \brief Modulator clock selection */
326  IfxDsadc_LowPowerSupply lowPowerSupply; /**< \brief Low power supply voltage selection */
328 
329 /** \} */
330 
331 /** \addtogroup IfxLld_Dsadc_Dsadc_Module
332  * \{ */
333 
334 /******************************************************************************/
335 /*-------------------------Global Function Prototypes-------------------------*/
336 /******************************************************************************/
337 
338 /** \brief Initialise the DSADC carrier generator
339  * \param dsadc pointer to the DSADC handle (it will be initialized by this function)
340  * \param config pointer to the DSADC carrier configuration
341  * \return None
342  */
344 
345 /** \brief Initialise the DSADC with the supplied configuration
346  * \param dsadc pointer to the DSADC handle (it will be initialized by this function)
347  * \param config pointer to the DSADC module configuration
348  * \return None
349  *
350  * A coding example can be found in \ref IfxDsadc_Dsadc_initChannel
351  *
352  */
354 
355 /** \brief Initialise the config struct with default DSADC configuration
356  * \param config pointer to the DSADC module configuration
357  * \param dsadc base address of the DSADC register space
358  * \return None
359  *
360  * A coding example can be found in \ref IfxDsadc_Dsadc_initChannel
361  *
362  */
364 
365 /** \} */
366 
367 /** \addtogroup IfxLld_Dsadc_Dsadc_Channel
368  * \{ */
369 
370 /******************************************************************************/
371 /*-------------------------Global Function Prototypes-------------------------*/
372 /******************************************************************************/
373 
374 /** \brief Initialise a DSADC channel with the supplied configuration
375  * \param channel pointer to the DSADC channel handle (it will be initialized by this function)
376  * \param config pointer to the DSADC module configuration
377  * \return None
378  *
379  * \code
380  * // disable pull-up devices for analog pads of P00 (assigned to some analog pins)
381  * P00_IOCR0.U = 0x00000000;
382  * P00_IOCR4.U = 0x00000000;
383  * P00_IOCR8.U = 0x00000000;
384  * P00_IOCR12.U = 0x00000000;
385  *
386  * // create module config
387  * IfxDsadc_Dsadc_Config dsadcConfig;
388  * IfxDsadc_Dsadc_initModuleConfig(&dsadcConfig, &MODULE_DSADC);
389  *
390  * // initialize module
391  * IfxDsadc_Dsadc dsadc;
392  * IfxDsadc_Dsadc_initModule(&dsadc, &dsadcConfig);
393  * // create channel config
394  * IfxDsadc_Dsadc_ChannelConfig dsadcChannelConfig;
395  * IfxDsadc_Dsadc_initChannelConfig(&dsadcChannelConfig, &dsadc);
396  *
397  * // modify default configuration
398  * dsadcChannelConfig.modulator.positiveInput = IfxDsadc_InputConfig_inputPin;
399  * dsadcChannelConfig.modulator.negativeInput = IfxDsadc_InputConfig_inputPin;
400  * dsadcChannelConfig.modulator.inputGain = IfxDsadc_InputGain_factor1;
401  * dsadcChannelConfig.modulator.inputPin = IfxDsadc_InputPin_a;
402  * dsadcChannelConfig.modulator.modulatorClockFreq = 10.0e6;
403  * dsadcChannelConfig.modulator.commonModeVoltage = IfxDsadc_CommonModeVoltage_c;
404  *
405  * dsadcChannelConfig.combFilter.bypassed = FALSE;
406  * dsadcChannelConfig.combFilter.combFilterType = IfxDsadc_MainCombFilterType_comb3;
407  * dsadcChannelConfig.combFilter.combFilterShift = IfxDsadc_MainCombFilterShift_noShift;
408  * dsadcChannelConfig.combFilter.serviceRequest = IfxDsadc_MainServiceRequest_everyNewResult;
409  * dsadcChannelConfig.combFilter.decimationFactor = 32;
410  * dsadcChannelConfig.combFilter.startValue = 32;
411  *
412  * dsadcChannelConfig.firFilter.fir0Enabled = TRUE;
413  * dsadcChannelConfig.firFilter.fir1Enabled = TRUE;
414  * dsadcChannelConfig.firFilter.offsetCompensation = FALSE;
415  * dsadcChannelConfig.firFilter.dataShift = IfxDsadc_FirDataShift_shiftBy2;
416  * dsadcChannelConfig.firFilter.internalShift = IfxDsadc_FirInternalShift_shiftBy1;
417  *
418  * // initialize channels
419  * for(int chn=0; chn<IFXDSADC_NUM_CHANNELS; ++chn) {
420  * dsadcChannelConfig.channelId = (IfxDsadc_ChannelId)chn;
421  *
422  * IfxDsadc_Dsadc_initChannel(&dsadcChannel[chn], &dsadcChannelConfig);
423  * }
424  *
425  * // start conversions
426  * IfxDsadc_Dsadc_startScan(&dsadc, 0x3f, 0x3f);
427  * \endcode
428  *
429  */
431 
432 /** \brief Initialise the config struct with default DSADC channel configuration
433  * \param config pointer to the DSADC module configuration
434  * \param dsadc pointer to the DSADC handle (it will be initialized by this function)
435  * \return None
436  *
437  * A coding example can be found in \ref IfxDsadc_Dsadc_initChannel
438  *
439  */
441 
442 /** \} */
443 
444 /** \addtogroup IfxLld_Dsadc_Dsadc_Operative
445  * \{ */
446 
447 /******************************************************************************/
448 /*-------------------------Inline Function Prototypes-------------------------*/
449 /******************************************************************************/
450 
451 /** \brief Enables the conversion of multiple channels
452  * \param dsadc Pointer to the DSADC handle
453  * \param modulatorMask the modulator which should be running (bitwise selection)
454  * \param channelMask the channels which should be scanned (bitwise selection)
455  * \return None
456  *
457  * \code
458  * // enable the conversion of all 6 DSADC channels
459  * IfxDsadc_Dsadc_startScan(&dsadc, 0x3f, 0x3f);
460  * // results are now available with \ref IfxDsadc_Dsadc_getMainResult
461  * \endcode
462  *
463  */
464 IFX_INLINE void IfxDsadc_Dsadc_startScan(IfxDsadc_Dsadc *dsadc, uint32 modulatorMask, uint32 channelMask);
465 
466 /** \brief Disables the conversion of multiple channels
467  * \param dsadc Pointer to the DSADC handle
468  * \param modulatorMask the modulator which should be running (bitwise selection)
469  * \return None
470  *
471  * \code
472  * // disable the modulators of all 6 DSADC channels
473  * IfxDsadc_Dsadc_stopScan(&dsadc, 0x3f);
474  * \endcode
475  *
476  */
477 IFX_INLINE void IfxDsadc_Dsadc_stopScan(IfxDsadc_Dsadc *dsadc, uint32 modulatorMask);
478 
479 /** \} */
480 
481 /** \addtogroup IfxLld_Dsadc_Dsadc_Results
482  * \{ */
483 
484 /******************************************************************************/
485 /*-------------------------Inline Function Prototypes-------------------------*/
486 /******************************************************************************/
487 
488 /** \brief Get result from the main chain
489  * \param channel Pointer to the DSADC channel handle
490  * \return result from the main chain
491  */
493 
494 /******************************************************************************/
495 /*-------------------------Global Function Prototypes-------------------------*/
496 /******************************************************************************/
497 
498 /** \brief Get result from the auxilary chain
499  * \param channel Pointer to the DSADC channel handle
500  * \return result from the auxiliary chain
501  */
503 
504 /** \} */
505 
506 /** \addtogroup IfxLld_Dsadc_Dsadc_Interrupt
507  * \{ */
508 
509 /******************************************************************************/
510 /*-------------------------Inline Function Prototypes-------------------------*/
511 /******************************************************************************/
512 
513 /** \brief Get the interrupt source register for a Aux event
514  * \param channel Pointer to the DSADC channel handle
515  * \return Address/pointer to the interrupt source register
516  */
517 IFX_INLINE volatile Ifx_SRC_SRCR *IfxDsadc_Dsadc_getAuxSrc(IfxDsadc_Dsadc_Channel *channel);
518 
519 /** \brief Get the interrupt source register for a Main event
520  * \param channel Pointer to the DSADC channel handle
521  * \return Address/pointer to the interrupt source register
522  */
523 IFX_INLINE volatile Ifx_SRC_SRCR *IfxDsadc_Dsadc_getMainSrc(IfxDsadc_Dsadc_Channel *channel);
524 
525 /** \} */
526 
527 /******************************************************************************/
528 /*---------------------Inline Function Implementations------------------------*/
529 /******************************************************************************/
530 
531 IFX_INLINE void IfxDsadc_Dsadc_startScan(IfxDsadc_Dsadc *dsadc, uint32 modulatorMask, uint32 channelMask)
532 {
533  IfxDsadc_startScan(dsadc->dsadc, modulatorMask, channelMask);
534 }
535 
536 
538 {
539  IfxDsadc_stopScan(dsadc->dsadc, modulatorMask);
540 }
541 
542 
544 {
545  return IfxDsadc_getMainResult(channel->module, channel->channelId);
546 }
547 
548 
550 {
551  return IfxDsadc_getAuxSrc(channel->module, channel->channelId);
552 }
553 
554 
556 {
557  return IfxDsadc_getMainSrc(channel->module, channel->channelId);
558 }
559 
560 
561 #endif /* IFXDSADC_DSADC_H */