ADCBufCC26XX.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2019, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file ADCBufCC26XX.h
34  *
35  * @brief ADCBuf driver implementation for a CC26XX analog-to-digital
36  * converter
37  *
38  * # Driver include #
39  * The ADCBuf header file should be included in an application as follows:
40  * @code
41  * #include <ti/drivers/ADCBuf.h>
42  * #include <ti/drivers/adc/ADCBufCC26XX.h>
43  * @endcode
44  *
45  * # Overview #
46  * This is a CC26XX specific implementation of the generic TI-RTOS ADCBuf driver.
47  * The generic ADCBuf API specified in ti/drivers/ADCBuf.h should be called by
48  * the application, not the device specific implementation in
49  * ti/drivers/adcbuf/ADCBufCC26XX. The board file defines the device specific
50  * configuration and casting in the general API ensures the correct device
51  * specific functions are called. You should specify an
52  * ADCBufCC26XX_ParamsExtension in the custom field of the ADCBuf_Params that
53  * suits your application. The default settings work for many, but not all,
54  * use cases.
55  *
56  * # General Behavior #
57  * A timer and the DMA are used to trigger the ADC and fill a buffer in the
58  * background (in hardware) at a specified frequency. The application may
59  * execute other tasks while the hardware handles the conversions. In contrast
60  * to the standard ti/drivers/ADC driver, this driver allows for precise
61  * sampling of waveforms.
62  *
63  * | Driver | Number of samples needed in one call |
64  * |----------------|-----------------------------------------|
65  * | ADC.h | 1 |
66  * | ADCBuf.h | > 1 |
67  *
68  * This ADCBuf driver provides an API interface to using the analog-to-digital
69  * converter directly from the CM3 without going through the sensor controller.
70  * The sensor controller can still use the ADC, support for sharing the ADC
71  * resource between the sensor controller and the CM3 is built into the driver.
72  * There is a hardware semaphore that the driver must acquire before beginning
73  * any number of conversions. This same hardware semaphore also prevents the
74  * simultaneous use of this driver and the basic ADC driver.
75  *
76  * The ADC drivers supports making between one and 1024 measurements once or
77  * continuous measuring with returned buffer sizes between one and 1024
78  * measurements.
79  *
80  * The application should call ADCBuf_init() once by the application to set the
81  * isOpened flag to false, indicating that the driver is ready to use.
82  *
83  * The ADC driver is opened by calling ADCBuf_open() which will
84  * set up interrupts and configure the internal components of the driver.
85  * However, the ADC hardware or analog pins are not yet configured, since the
86  * sensor controller or basic ADC driver might be using the ADC.
87  *
88  * In order to perform an ADC conversion, the application should call
89  * ADCBuf_convert(). This call will request the ADC resource, configure the ADC,
90  * set up the DMA and GPTimer, and perform the requested ADC conversions on the
91  * selected DIO or internal signal. The DIO or internal signal is defined by the
92  * ADCBuf_Conversion structure in the application code and adcBufCC26xxObjects
93  * in the board file.
94  *
95  * @warning If the ADCBUF driver is setup in ADCBuf_RECURRENCE_MODE_CONTINUOUS
96  * mode, the user must assure that the provided callback function is
97  * completed before the next conversion completes. If the next
98  * conversion completes before the callback function finishes, the DMA
99  * will clobber the previous buffer with new data.
100  *
101  * If the sensor controller is using the ADC when the driver requests it at the
102  * start of the ADC_convert() call, the conversion will fail and return false.
103  * The ADC resource may be pre-acquired by calling the control function
104  * ADCBufCC26XX_CMD_ACQUIRE_ADC_SEMAPHORE. It will be released again
105  * automatically after the next conversion completes.
106  *
107  * In both ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS mode and
108  * ADCBufCC26XX_SAMPING_MODE_ASYNCHRONOUS mode, enough sampling time must be
109  * provided between conversions that each measurement may be completed before
110  * the next trigger arrives.
111  *
112  * @note The ADCBuf driver requires GPTimer0A to function correctly. It
113  * expects it to be configured as position 0 in the GPTimer Config
114  * Table. GPTimer0A will be unavailable for other uses.
115  *
116  * # Supported ADC pins #
117  * Below is a table of the supported ADC IO pins for each package size, for both
118  * CC26xx and CC13xx. It maps a DIO to its corresponding driverlib define for
119  * the CompBInput that it is hardwired to. This table can be used to create
120  * virtual channel entries in the ADCBufCC26XX_adcChannelLut table in the board
121  * file.
122  *
123  * | DIO | CC26xx 7x7 AUXIO CompBInput | CC13xx 7x7 AUXIO CompBInput | CC26xx 5x5 AUXIO CompBInput | CC13xx 5x5
124  *AUXIO CompBInput | CC26xx 4x4 AUXIO CompBInput | CC13xx 4x4 AUXIO CompBInput
125  * |--------|-------------------------------|-------------------------------|-------------------------------|-------------------------------|-------------------------------|-----------------------------
126  * | 0 | No | No | No | No | No |
127  *No | 1 | No | No | No | No | No
128  *| No | 2 | No | No | No | No |
129  *No | No | 3 | No | No | No | No
130  *| No | No | 4 | No | No | No |
131  *No | No | No | 5 | No | No | No
132  *| No | ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO7 | 6 | No | No | No | No |
133  *ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO6 | 7 | No | No |
134  *ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO5 | ADC_COMPB_IN_AUXIO5 |
135  *8 | No | No | ADC_COMPB_IN_AUXIO6 |
136  *ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO4 | 9 | No | No |
137  *ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO3 | ADC_COMPB_IN_AUXIO3 |
138  *10 | No | No | ADC_COMPB_IN_AUXIO5 |
139  *ADC_COMPB_IN_AUXIO5 | No | No | 11 | No | No |
140  *ADC_COMPB_IN_AUXIO3 | ADC_COMPB_IN_AUXIO3 | No | No | 12 | No | No
141  *| ADC_COMPB_IN_AUXIO2 | ADC_COMPB_IN_AUXIO2 | No | No | 13 | No |
142  *No | ADC_COMPB_IN_AUXIO1 | ADC_COMPB_IN_AUXIO1 | No | No | 14 | No
143  *| No | ADC_COMPB_IN_AUXIO0 | ADC_COMPB_IN_AUXIO0 | No | No | 15-22 |
144  *No | No | No | No | No | No | 23 |
145  *ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO7 | No | No | No | No | 24 |
146  *ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO6 | No | No | No | No | 25 |
147  *ADC_COMPB_IN_AUXIO5 | ADC_COMPB_IN_AUXIO5 | No | No | No | No | 26 |
148  *ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO4 | No | No | No | No | 27 |
149  *ADC_COMPB_IN_AUXIO3 | ADC_COMPB_IN_AUXIO3 | No | No | No | No | 28 |
150  *ADC_COMPB_IN_AUXIO2 | ADC_COMPB_IN_AUXIO2 | No | No | No | No | 29 |
151  *ADC_COMPB_IN_AUXIO1 | ADC_COMPB_IN_AUXIO1 | No | No | No | No | 30 |
152  *ADC_COMPB_IN_AUXIO0 | ADC_COMPB_IN_AUXIO0 | No | No | No | No
153  *
154  * # Supported Internal Signals #
155  * Below is a table of internal signals that can be measured using the ADC.
156  * Since we are not connecting to a DIO, there is no DIO to internal signal
157  * mapping. The DIO field in the channel lookup table should be marked
158  * PIN_UNASSIGNED. This table can be used to create virtual channel entries in
159  * the ADCBufCC26XX_adcChannelLut table in the board file.
160  *
161  * | DIO | Internal Signal CompBInput |
162  * |--------------------|-------------------------------|
163  * | PIN_UNASSIGNED | ADC_COMPB_IN_DCOUPL |
164  * | PIN_UNASSIGNED | ADC_COMPB_IN_VSS |
165  * | PIN_UNASSIGNED | ADC_COMPB_IN_VDDS |
166  *
167  * # Error handling #
168  * The following errors may occur when opening the ADC without assertions enabled:
169  * - The ADC handle is already open.
170  *
171  * The following errors may occur when requesting an ADC conversion:
172  * - The ADC is currently already doing a conversion.
173  * - The ADC was not available (used by sensor controller or basic ADC).
174  *
175  *
176  * # Power Management #
177  * The TI-RTOS power management framework will try to put the device into the
178  * most power efficient mode whenever possible. Please see the technical
179  * reference manual for further details on each power mode.
180  *
181  * While converting, the ADCBufCC26XX driver sets a power constraint to keep
182  * the device out of standby. When the conversion has finished, the power
183  * constraint is released. The driver also sets a dependency on the DMA to
184  * enable background transfers from the ADC FIFO to memory and to clear the
185  * GPTimer interrupt.
186  * The following statements are valid:
187  * - After ADCBuf_convert(): the device cannot enter standby.
188  * - After ADCBuf_convertCancel(): the device can enter standby again.
189  * - After a conversion finishes: the device can enter standby again.
190  *
191  *
192  * # Supported Functions #
193  * | API function | Description |
194  * |------------------------------------|-----------------------------------------------------------------------|
195  * | ADCBuf_init() | Initialize ADC driver |
196  * | ADCBuf_open() | Open the ADC driver and configure driver |
197  * | ADCBuf_convert() | Perform ADC conversion |
198  * | ADCBuf_convertCancel() | Cancel ongoing ADC conversion |
199  * | ADCBuf_close() | Close ADC driver |
200  * | ADCBuf_Params_init() | Initialise ADCBuf_Params structure to default values |
201  * | ADCBuf_getResolution() | Get the resolution of the ADC of the current device |
202  * | ADCBuf_adjustRawValues() | Adjust the values in a returned buffer for manufacturing tolerances |
203  * | ADCBuf_convertAdjustedToMicroVolts | Convert a buffer of adjusted values to microvolts |
204  * | ADCBuf_control() | Execute device specific functions |
205  *
206  *
207  * # Not Supported Functionality #
208  * - Performing conversions on multiple channels simultaneously is not
209  * supported. In other words, the parameter channelCount must always be
210  * set to 1 when calling ADCBuf_convert(). The ADC on CC26XX devices does
211  * not support time-division multiplexing of channels or pins in hardware.
212  *
213  * # Use Cases #
214  * ## Basic one-shot conversion #
215  * Perform one conversion on CONFIG_ADCCHANNEL_A1 in ::ADCBuf_RETURN_MODE_BLOCKING.
216  * @code
217  * #include <ti/drivers/ADCBuf.h>
218  *
219  * #define ADCBUFFERSIZE 100
220  *
221  * ADCBuf_Handle adcBufHandle;
222  * ADCBuf_Params adcBufParams;
223  * ADCBuf_Conversion blockingConversion;
224  * uint16_t sampleBufferOne[ADCBUFFERSIZE];
225  *
226  * ADCBuf_Params_init(&adcBufParams);
227  * adcBufHandle = ADCBuf_open(CONFIG_ADCBuf0, &adcBufParams);
228  * if (adcBufHandle == NULL) {
229  * // handle error
230  * }
231  *
232  * blockingConversion.arg = NULL;
233  * blockingConversion.adcChannel = CONFIG_ADCCHANNEL_A1;
234  * blockingConversion.sampleBuffer = sampleBufferOne;
235  * blockingConversion.sampleBufferTwo = NULL;
236  * blockingConversion.samplesRequestedCount = ADCBUFFERSIZE;
237  *
238  * if (ADCBuf_convert(adcBufHandle, &blockingConversion, 1) != ADCBuf_STATUS_SUCCESS) {
239  * // handle error
240  * }
241  * @endcode
242  *
243  * ## Using ADCBufCC26XX_ParamsExtension #
244  * This specific configuration performs one conversion on CONFIG_ADCCHANNEL_A1
245  * in ::ADCBuf_RETURN_MODE_BLOCKING. The custom parameters used here are
246  * identical to the defaults parameters. Users can of course define their own
247  * parameters.
248  * @code
249  * #include <ti/drivers/ADCBuf.h>
250  *
251  * #define ADCBUFFERSIZE 100
252  *
253  * ADCBuf_Handle adcBufHandle;
254  * ADCBuf_Params adcBufParams;
255  * ADCBuf_Conversion blockingConversion;
256  * uint16_t sampleBufferOne[ADCBUFFERSIZE];
257  * ADCBufCC26XX_ParamsExtension customParams;
258  *
259  * ADCBuf_Params_init(&adcBufParams);
260  * customParams.samplingDuration = ADCBufCC26XX_SAMPLING_DURATION_2P7_US;
261  * customParams.refSource = ADCBufCC26XX_FIXED_REFERENCE;
262  * customParams.samplingMode = ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS;
263  * customParams.inputScalingEnabled = true;
264  *
265  * adcBufParams.custom = &customParams;
266  *
267  * adcBufHandle = ADCBuf_open(CONFIG_ADCBuf0, &adcBufParams);
268  * if (adcBufHandle == NULL) {
269  * // handle error
270  * }
271  *
272  * blockingConversion.arg = NULL;
273  * blockingConversion.adcChannel = CONFIG_ADCCHANNEL_A1;
274  * blockingConversion.sampleBuffer = sampleBufferOne;
275  * blockingConversion.sampleBufferTwo = NULL;
276  * blockingConversion.samplesRequestedCount = ADCBUFFERSIZE;
277  *
278  * if (ADCBuf_convert(adcBufHandle, &blockingConversion, 1) != ADCBuf_STATUS_SUCCESS) {
279  * // handle error
280  * }
281  * @endcode
282  *
283  * # Instrumentation #
284  * The ADC driver interface produces log statements if instrumentation is
285  * enabled.
286  *
287  * Diagnostics Mask | Log details |
288  * ---------------- | ----------- |
289  * Diags_USER1 | basic ADCBuf operations performed |
290  * Diags_USER2 | detailed ADCBuf operations performed |
291  *
292  ******************************************************************************
293  */
294 
295 #ifndef ti_drivers_adc_adcbufcc26xx__include
296 #define ti_drivers_adc_adcbufcc26xx__include
297 
298 #include <stdint.h>
299 #include <stdbool.h>
300 
301 #include <ti/drivers/ADCBuf.h>
302 #include <ti/drivers/PIN.h>
303 #include <ti/drivers/pin/PINCC26XX.h>
306 #include <ti/drivers/Power.h>
308 
309 #include <ti/devices/DeviceFamily.h>
310 #include DeviceFamily_constructPath(driverlib/aux_adc.h)
311 
312 #include <ti/drivers/dpl/HwiP.h>
313 #include <ti/drivers/dpl/ClockP.h>
314 #include <ti/drivers/dpl/SemaphoreP.h>
315 #include <ti/drivers/dpl/SwiP.h>
316 
317 #ifdef __cplusplus
318 extern "C" {
319 #endif
320 
333 /* Add ADCBufCC26XX_CMD_* macros here */
334 
350 #define ADCBufCC26XX_CMD_ACQUIRE_ADC_SEMAPHORE ADCBuf_CMD_RESERVED + 1
351 
367 #define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE ADCBuf_CMD_RESERVED + 2
368 
377 #define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE_DISABLE ADCBuf_CMD_RESERVED + 3
378 
385 #define ADCBufCC26XX_CMD_RELEASE_ADC_SEMAPHORE ADCBuf_CMD_RESERVED + 4
386 
392 #define ADCBufCC26XX_RESOLUTION 12
393 
394 #define ADCBufCC26XX_BYTES_PER_SAMPLE 2
395 
396 /*
397  * =============================================================================
398  * Constants
399  * =============================================================================
400  */
401 
402 /* ADCBuf function table pointer */
404 
405 /*
406  * =============================================================================
407  * Enumerations
408  * =============================================================================
409  */
410 
426 typedef enum
427 {
431 
442 typedef enum
443 {
444  ADCBufCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US,
445  ADCBufCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US,
446  ADCBufCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US,
447  ADCBufCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
448  ADCBufCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US,
449  ADCBufCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US,
450  ADCBufCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US,
451  ADCBufCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
452  ADCBufCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US,
453  ADCBufCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS,
454  ADCBufCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS,
455  ADCBufCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
456  ADCBufCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
458 
491 typedef enum
492 {
493  ADCBufCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED,
494  ADCBufCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL
496 
497 /*
498  * =============================================================================
499  * Structs
500  * =============================================================================
501  */
502 
511 typedef struct
512 {
513  uint8_t dio;
514  uint8_t compBInput;
516 
525 typedef struct
526 {
528  ADCBufCC26XX_Sampling_Duration samplingDuration;
531  ADCBufCC26XX_Sampling_Mode samplingMode;
534  ADCBufCC26XX_Reference_Source refSource;
552 
573 typedef struct
574 {
581  uint32_t swiPriority;
596  uint8_t intPriority;
601 
607 typedef struct
608 {
609  /* ADC control variables */
611  bool isOpen;
621  uint8_t currentChannel;
623  ADCBufCC26XX_Reference_Source refSource;
625  ADCBufCC26XX_Sampling_Mode samplingMode;
627  ADCBufCC26XX_Sampling_Duration samplingDuration;
636 
637  /* ADC SYS/BIOS objects */
639  HwiP_Struct hwi;
641  SwiP_Struct swi;
643  SemaphoreP_Struct conversionComplete;
646 
647  /* PIN driver state object and handle */
649  PIN_State pinState;
651  PIN_Handle pinHandle;
652 
653  /* UDMA driver handle */
656 
657  /* GPTimer driver handle */
660 
666 
667 /*
668  * =============================================================================
669  * Functions
670  * =============================================================================
671  */
672 
673 #ifdef __cplusplus
674 }
675 #endif
676 
677 #endif /* ti_drivers_adc_ADCBufCC26XX__include */
ADCBufCC26XX_Sampling_Mode
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCBufCC26XX.h:426
Definition: ADCBufCC26XX.h:428
Definition: ADCBufCC26XX.h:494
Definition: ADCBufCC26XX.h:444
GPTimerCC26XX_Handle timerHandle
Definition: ADCBufCC26XX.h:659
GPTimer driver implementation for CC26XX/CC13XX.
ADCBufCC26XX_Reference_Source refSource
Definition: ADCBufCC26XX.h:534
bool inputScalingEnabled
Definition: ADCBufCC26XX.h:550
bool adcSemaphoreInPossession
Definition: ADCBufCC26XX.h:619
Definition: ADCBufCC26XX.h:448
bool isOpen
Definition: ADCBufCC26XX.h:611
ADCBufCC26XX Hardware Attributes.
Definition: ADCBufCC26XX.h:573
ADCBuf_Return_Mode returnMode
Definition: ADCBufCC26XX.h:633
Definition: ADCBufCC26XX.h:455
Power Manager.
Analog to Digital Conversion Buffer (ADCBuf) Input Driver.
Definition: ADCBufCC26XX.h:452
ADCBufCC26XX_Sampling_Mode samplingMode
Definition: ADCBufCC26XX.h:531
uint32_t swiPriority
ADC SWI priority. The higher the number, the higher the priority. The minimum is 0 and the maximum is...
Definition: ADCBufCC26XX.h:581
UDMACC26XX Global configuration.
Definition: UDMACC26XX.h:253
Power manager interface for CC26XX/CC13XX.
uint32_t semaphoreTimeout
Definition: ADCBufCC26XX.h:662
CC26XX specfic extension to ADCBuf_Params.
Definition: ADCBufCC26XX.h:525
PIN_Handle pinHandle
Definition: ADCBufCC26XX.h:651
Definition: ADCBufCC26XX.h:449
uint8_t intPriority
ADC peripheral&#39;s interrupt priority.
Definition: ADCBufCC26XX.h:596
ADCBufCC26XX_Reference_Source refSource
Definition: ADCBufCC26XX.h:623
Definition: ADCBufCC26XX.h:451
bool inputScalingEnabled
Definition: ADCBufCC26XX.h:615
ADCBufCC26XX_Sampling_Duration samplingDuration
Definition: ADCBufCC26XX.h:528
Definition: ADCBufCC26XX.h:450
bool keepADCSemaphore
Definition: ADCBufCC26XX.h:617
ADCBufCC26XX_Sampling_Duration samplingDuration
Definition: ADCBufCC26XX.h:627
ADCBuf_Callback callbackFxn
Definition: ADCBufCC26XX.h:629
ADCBuf_Recurrence_Mode recurrenceMode
Definition: ADCBufCC26XX.h:631
Definition: ADCBufCC26XX.h:453
Definition: ADCBufCC26XX.h:456
struct ADCBufCC26XX_Object * ADCBufCC26XX_Handle
The definition of an ADCBuf function table that contains the required set of functions to control a s...
Definition: ADCBuf.h:598
Definition: ADCBufCC26XX.h:429
UDMACC26XX driver implementation.
Definition: ADCBufCC26XX.h:447
Definition: ADCBufCC26XX.h:493
ADCBufCC26XX_Reference_Source
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCBufCC26XX.h:491
UDMACC26XX_Handle udmaHandle
Definition: ADCBufCC26XX.h:655
Definition: ADCBufCC26XX.h:445
bool conversionInProgress
Definition: ADCBufCC26XX.h:613
SemaphoreP_Struct conversionComplete
Definition: ADCBufCC26XX.h:643
uint8_t currentChannel
Definition: ADCBufCC26XX.h:621
ADCBufCC26XX_AdcChannelLutEntry const * adcChannelLut
Definition: ADCBufCC26XX.h:599
GPTimer Global configuration.
Definition: GPTimerCC26XX.h:404
ADCBufCC26XX_Sampling_Mode samplingMode
Definition: ADCBufCC26XX.h:625
ADCBuf_Recurrence_Mode
Recurrence behavior of a ADCBuf_Conversion specified in the ADCBuf_Params.
Definition: ADCBuf.h:406
ADCBuf_Return_Mode
Return behavior for ADCBuf_convert() specified in the ADCBuf_Params.
Definition: ADCBuf.h:448
uint8_t dio
Definition: ADCBufCC26XX.h:513
PIN_State pinState
Definition: ADCBufCC26XX.h:649
ADCBuf_Conversion * currentConversion
Definition: ADCBufCC26XX.h:645
SwiP_Struct swi
Definition: ADCBufCC26XX.h:641
uint32_t samplingFrequency
Definition: ADCBufCC26XX.h:664
Defines a conversion to be used with ADCBuf_convert().
Definition: ADCBuf.h:314
uint8_t compBInput
Definition: ADCBufCC26XX.h:514
Definition: ADCBufCC26XX.h:446
Definition: ADCBufCC26XX.h:454
ADCBufCC26XX Object.
Definition: ADCBufCC26XX.h:607
const ADCBuf_FxnTable ADCBufCC26XX_fxnTable
HwiP_Struct hwi
Definition: ADCBufCC26XX.h:639
void(* ADCBuf_Callback)(ADCBuf_Handle handle, ADCBuf_Conversion *conversion, void *completedADCBuffer, uint32_t completedChannel, int_fast16_t status)
The definition of a callback function.
Definition: ADCBuf.h:392
Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal...
Definition: ADCBufCC26XX.h:511
uint16_t * activeSampleBuffer
Definition: ADCBufCC26XX.h:635
ADCBufCC26XX_Sampling_Duration
Amount of time the ADC spends sampling the analogue input.
Definition: ADCBufCC26XX.h:442
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale