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 converter
36  *
37  * # Driver include #
38  * The ADCBuf header file should be included in an application as follows:
39  * @code
40  * #include <ti/drivers/ADCBuf.h>
41  * #include <ti/drivers/adc/ADCBufCC26XX.h>
42  * @endcode
43  *
44  * # Overview #
45  * This is a CC26XX specific implementation of the generic TI-RTOS ADCBuf driver.
46  * The generic ADCBuf API specified in ti/drivers/ADCBuf.h should be called by the application,
47  * not the device specific implementation in ti/drivers/adcbuf/ADCBufCC26XX.
48  * The board file defines the device specific configuration and casting in the general
49  * API ensures the correct device specific functions are called. You should specify an
50  * ADCBufCC26XX_ParamsExtension in the custom field of the ADCBuf_Params that suits
51  * your application. The default settings work for many, but not all, usecases.
52  *
53  * # General Behavior #
54  * A timer and the DMA are used to trigger the ADC and fill a buffer in the background (in hardware) at a specified frequency.
55  * The application may execute other tasks while the hardware handles the conversions.
56  * In contrast to the standard ti/drivers/ADC driver, this driver allows for precise sampling of waveforms.
57  *
58  * | Driver | Number of samples needed in one call |
59  * |----------------|-----------------------------------------|
60  * | ADC.h | 1 |
61  * | ADCBuf.h | > 1 |
62  *
63  * This ADCBuf driver provides an API interface to using the analog-to-digital converter
64  * directly from the CM3 without going through the sensor controller.
65  * The sensor controller can still use the ADC, support for sharing the ADC resource between the
66  * sensor controller and the CM3 is built into the driver. There is a hardware semaphore that the
67  * driver must acquire before beginning any number of conversions. This same hardware semaphore also
68  * prevents the simultaneous use of this driver and the basic ADC driver.
69  *
70  * The ADC drivers supports making between one and 1024 measurements once or continuous
71  * measuring with returned buffer sizes between one and 1024 measurements.
72  *
73  * The application should call ADCBuf_init() once by the application to set the isOpened
74  * flag to false, indicating that the driver is ready to use.
75  *
76  * The ADC driver is opened by calling ADCBuf_open() which will
77  * set up interrupts and configure the internal components of the driver.
78  * However, the ADC hardware or analog pins are not yet configured, since the sensor
79  * controller or basic ADC driver might be using the ADC.
80  *
81  * In order to perform an ADC conversion, the application should call
82  * ADCBuf_convert(). This call will request the ADC resource, configure the ADC, set up the DMA and GPTimer,
83  * and perform the requested ADC conversions on the selected DIO or internal signal. The DIO or internal signal is defined by the
84  * ADCBuf_Conversion structure in the application code and adcBufCC26xxObjects in the board file.
85  *
86  * @warning If the ADCBUF driver is setup in ADCBuf_RECURRENCE_MODE_CONTINUOUS mode, the user must assure that the provided callback
87  * function is completed before the next conversion completes. If the next conversion completes before the callback function finishes,
88  * the DMA will clobber the previous buffer with new data.
89  *
90  * If the sensor controller is using the ADC when the driver requests it at the start of the ADC_convert() call,
91  * the conversion will fail and return false.
92  * The ADC resource may be pre-acquired by calling the control function ADCBufCC26XX_CMD_ACQUIRE_ADC_SEMAPHORE.
93  * It will be released again automatically after the next conversion completes.
94  *
95  * In both ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS mode and ADCBufCC26XX_SAMPING_MODE_ASYNCHRONOUS mode, enough sampling
96  * time must be provided between conversions that each measurement may be completed before the next trigger arrives.
97  *
98  * @note The ADCBuf driver requires GPTimer0A to function correctly. It expects it to be configured as position 0 in the GPTimer Config Table.
99  * GPTimer0A will be unavailable for other uses.
100  *
101  * # Supported ADC pins #
102  * Below is a table of the supported ADC IO pins for each package size, for both CC26xx and CC13xx.
103  * It maps a DIO to its corresponding driverlib define for the CompBInput that it is hardwired to.
104  * This table can be used to create virtual channel entries in the ADCBufCC26XX_adcChannelLut table in the board file.
105  *
106  * | DIO | CC26xx 7x7 AUXIO CompBInput | CC13xx 7x7 AUXIO CompBInput | CC26xx 5x5 AUXIO CompBInput | CC13xx 5x5 AUXIO CompBInput | CC26xx 4x4 AUXIO CompBInput | CC13xx 4x4 AUXIO CompBInput
107  * |--------|-------------------------------|-------------------------------|-------------------------------|-------------------------------|-------------------------------|-----------------------------
108  * | 0 | No | No | No | No | No | No
109  * | 1 | No | No | No | No | No | No
110  * | 2 | No | No | No | No | No | No
111  * | 3 | No | No | No | No | No | No
112  * | 4 | No | No | No | No | No | No
113  * | 5 | No | No | No | No | ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO7
114  * | 6 | No | No | No | No | ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO6
115  * | 7 | No | No | ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO5 | ADC_COMPB_IN_AUXIO5
116  * | 8 | No | No | ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO4
117  * | 9 | No | No | ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO3 | ADC_COMPB_IN_AUXIO3
118  * | 10 | No | No | ADC_COMPB_IN_AUXIO5 | ADC_COMPB_IN_AUXIO5 | No | No
119  * | 11 | No | No | ADC_COMPB_IN_AUXIO3 | ADC_COMPB_IN_AUXIO3 | No | No
120  * | 12 | No | No | ADC_COMPB_IN_AUXIO2 | ADC_COMPB_IN_AUXIO2 | No | No
121  * | 13 | No | No | ADC_COMPB_IN_AUXIO1 | ADC_COMPB_IN_AUXIO1 | No | No
122  * | 14 | No | No | ADC_COMPB_IN_AUXIO0 | ADC_COMPB_IN_AUXIO0 | No | No
123  * | 15-22 | No | No | No | No | No | No
124  * | 23 | ADC_COMPB_IN_AUXIO7 | ADC_COMPB_IN_AUXIO7 | No | No | No | No
125  * | 24 | ADC_COMPB_IN_AUXIO6 | ADC_COMPB_IN_AUXIO6 | No | No | No | No
126  * | 25 | ADC_COMPB_IN_AUXIO5 | ADC_COMPB_IN_AUXIO5 | No | No | No | No
127  * | 26 | ADC_COMPB_IN_AUXIO4 | ADC_COMPB_IN_AUXIO4 | No | No | No | No
128  * | 27 | ADC_COMPB_IN_AUXIO3 | ADC_COMPB_IN_AUXIO3 | No | No | No | No
129  * | 28 | ADC_COMPB_IN_AUXIO2 | ADC_COMPB_IN_AUXIO2 | No | No | No | No
130  * | 29 | ADC_COMPB_IN_AUXIO1 | ADC_COMPB_IN_AUXIO1 | No | No | No | No
131  * | 30 | ADC_COMPB_IN_AUXIO0 | ADC_COMPB_IN_AUXIO0 | No | No | No | No
132  *
133  * # Supported Internal Signals #
134  * Below is a table of internal signals that can be measured using the ADC.
135  * Since we are not connecting to a DIO, there is no DIO to internal signal mapping. The DIO field in the channel lookup table should be marked PIN_UNASSIGNED.
136  * This table can be used to create virtual channel entries in the ADCBufCC26XX_adcChannelLut table in the board file.
137  *
138  * | DIO | Internal Signal CompBInput |
139  * |--------------------|-------------------------------|
140  * | PIN_UNASSIGNED | ADC_COMPB_IN_DCOUPL |
141  * | PIN_UNASSIGNED | ADC_COMPB_IN_VSS |
142  * | PIN_UNASSIGNED | ADC_COMPB_IN_VDDS |
143  *
144  * # Error handling #
145  * The following errors may occur when opening the ADC without assertions enabled:
146  * - The ADC handle is already open.
147  *
148  * The following errors may occur when requesting an ADC conversion:
149  * - The ADC is currently already doing a conversion.
150  * - The ADC was not available (used by sensor controller or basic ADC).
151  *
152  *
153  * # Power Management #
154  * The TI-RTOS power management framework will try to put the device into the most
155  * power efficient mode whenever possible. Please see the technical reference
156  * manual for further details on each power mode.
157  *
158  * While converting, the ADCBufCC26XX driver sets a power constraint to keep
159  * the device out of standby. When the conversion has finished, the power
160  * constraint is released. The driver also sets a dependency on the DMA to enable
161  * background transfers from the ADC FIFO to memory and to clear the GPTimer interrupt.
162  * The following statements are valid:
163  * - After ADCBuf_convert(): the device cannot enter standby.
164  * - After ADCBuf_convertCancel(): the device can enter standby again.
165  * - After a conversion finishes: the device can enter standby again.
166  *
167  *
168  * # Supported Functions #
169  * | API function | Description |
170  * |------------------------------------|-----------------------------------------------------------------------|
171  * | ADCBuf_init() | Initialize ADC driver |
172  * | ADCBuf_open() | Open the ADC driver and configure driver |
173  * | ADCBuf_convert() | Perform ADC conversion |
174  * | ADCBuf_convertCancel() | Cancel ongoing ADC conversion |
175  * | ADCBuf_close() | Close ADC driver |
176  * | ADCBuf_Params_init() | Initialise ADCBuf_Params structure to default values |
177  * | ADCBuf_getResolution() | Get the resolution of the ADC of the current device |
178  * | ADCBuf_adjustRawValues() | Adjust the values in a returned buffer for manufacturing tolerances |
179  * | ADCBuf_convertAdjustedToMicroVolts | Convert a buffer of adjusted values to microvolts |
180  * | ADCBuf_control() | Execute device specific functions |
181  *
182  *
183  * # Not Supported Functionality #
184  * - Performing conversions on multiple channels simultaneously is not supported.
185  * In other words, the parameter channelCount must always be set to 1 when calling ADCBuf_convert().
186  * The ADC on CC26XX devices does not support time-division multiplexing of channels or pins in hardware.
187  *
188  * # Use Cases #
189  * ## Basic one-shot conversion #
190  * Perform one conversion on Board_ADCCHANNEL_A1 in ::ADCBuf_RETURN_MODE_BLOCKING.
191  * @code
192  * #include <ti/drivers/ADCBuf.h>
193  *
194  * #define ADCBUFFERSIZE 100
195  *
196  * ADCBuf_Handle adcBufHandle;
197  * ADCBuf_Params adcBufParams;
198  * ADCBuf_Conversion blockingConversion;
199  * uint16_t sampleBufferOne[ADCBUFFERSIZE];
200  *
201  * ADCBuf_Params_init(&adcBufParams);
202  * adcBufHandle = ADCBuf_open(Board_ADCBuf0, &adcBufParams);
203  * if (adcBufHandle == NULL) {
204  * // handle error
205  * }
206  *
207  * blockingConversion.arg = NULL;
208  * blockingConversion.adcChannel = Board_ADCCHANNEL_A1;
209  * blockingConversion.sampleBuffer = sampleBufferOne;
210  * blockingConversion.sampleBufferTwo = NULL;
211  * blockingConversion.samplesRequestedCount = ADCBUFFERSIZE;
212  *
213  * if (ADCBuf_convert(adcBufHandle, &blockingConversion, 1) != ADCBuf_STATUS_SUCCESS) {
214  * // handle error
215  * }
216  * @endcode
217  *
218  * ## Using ADCBufCC26XX_ParamsExtension #
219  * This specific configuration performs one conversion on Board_ADCCHANNEL_A1 in ::ADCBuf_RETURN_MODE_BLOCKING.
220  * The custom parameters used here are identical to the defaults parameters.
221  * Users can of course define their own parameters.
222  * @code
223  * #include <ti/drivers/ADCBuf.h>
224  *
225  * #define ADCBUFFERSIZE 100
226  *
227  * ADCBuf_Handle adcBufHandle;
228  * ADCBuf_Params adcBufParams;
229  * ADCBuf_Conversion blockingConversion;
230  * uint16_t sampleBufferOne[ADCBUFFERSIZE];
231  * ADCBufCC26XX_ParamsExtension customParams;
232  *
233  * ADCBuf_Params_init(&adcBufParams);
234  * customParams.samplingDuration = ADCBufCC26XX_SAMPLING_DURATION_2P7_US;
235  * customParams.refSource = ADCBufCC26XX_FIXED_REFERENCE;
236  * customParams.samplingMode = ADCBufCC26XX_SAMPING_MODE_SYNCHRONOUS;
237  * customParams.inputScalingEnabled = true;
238  *
239  * adcBufParams.custom = &customParams;
240  *
241  * adcBufHandle = ADCBuf_open(Board_ADCBuf0, &adcBufParams);
242  * if (adcBufHandle == NULL) {
243  * // handle error
244  * }
245  *
246  * blockingConversion.arg = NULL;
247  * blockingConversion.adcChannel = Board_ADCCHANNEL_A1;
248  * blockingConversion.sampleBuffer = sampleBufferOne;
249  * blockingConversion.sampleBufferTwo = NULL;
250  * blockingConversion.samplesRequestedCount = ADCBUFFERSIZE;
251  *
252  * if (ADCBuf_convert(adcBufHandle, &blockingConversion, 1) != ADCBuf_STATUS_SUCCESS) {
253  * // handle error
254  * }
255  * @endcode
256  *
257  * # Instrumentation #
258  * The ADC driver interface produces log statements if instrumentation is
259  * enabled.
260  *
261  * Diagnostics Mask | Log details |
262  * ---------------- | ----------- |
263  * Diags_USER1 | basic ADCBuf operations performed |
264  * Diags_USER2 | detailed ADCBuf operations performed |
265  *
266  ******************************************************************************
267  */
268 
269 #ifndef ti_drivers_adc_adcbufcc26xx__include
270 #define ti_drivers_adc_adcbufcc26xx__include
271 
272 #ifdef __cplusplus
273 extern "C" {
274 #endif
275 
276 #include <stdint.h>
277 #include <stdbool.h>
278 
279 #include <ti/drivers/ADCBuf.h>
280 #include <ti/drivers/PIN.h>
284 #include <ti/drivers/Power.h>
286 
287 #include <ti/devices/DeviceFamily.h>
288 #include DeviceFamily_constructPath(driverlib/aux_adc.h)
289 
290 #include <ti/drivers/dpl/HwiP.h>
291 #include <ti/drivers/dpl/ClockP.h>
292 #include <ti/drivers/dpl/SemaphoreP.h>
293 #include <ti/drivers/dpl/SwiP.h>
294 
307 /* Add ADCBufCC26XX_CMD_* macros here */
308 
322 #define ADCBufCC26XX_CMD_ACQUIRE_ADC_SEMAPHORE ADCBuf_CMD_RESERVED + 1
323 
337 #define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE ADCBuf_CMD_RESERVED + 2
338 
346 #define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE_DISABLE ADCBuf_CMD_RESERVED + 3
347 
353 #define ADCBufCC26XX_CMD_RELEASE_ADC_SEMAPHORE ADCBuf_CMD_RESERVED + 4
354 
360 #define ADCBufCC26XX_RESOLUTION 12
361 
362 #define ADCBufCC26XX_BYTES_PER_SAMPLE 2
363 
364 /*
365  * =============================================================================
366  * Constants
367  * =============================================================================
368  */
369 
370 /* ADCBuf function table pointer */
372 
373 
374 /*
375  * =============================================================================
376  * Enumerations
377  * =============================================================================
378  */
379 
394 
404  ADCBufCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US,
405  ADCBufCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US,
406  ADCBufCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US,
407  ADCBufCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
408  ADCBufCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US,
409  ADCBufCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US,
410  ADCBufCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US,
411  ADCBufCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
412  ADCBufCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US,
413  ADCBufCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS,
414  ADCBufCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS,
415  ADCBufCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
416  ADCBufCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
418 
419 
441  ADCBufCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED,
442  ADCBufCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL
444 
445 
446 
447 /*
448  * =============================================================================
449  * Structs
450  * =============================================================================
451  */
452 
460  uint8_t dio;
461  uint8_t compBInput;
463 
473  ADCBufCC26XX_Sampling_Duration samplingDuration;
475  ADCBufCC26XX_Sampling_Mode samplingMode;
477  ADCBufCC26XX_Reference_Source refSource;
495 
516 typedef struct ADCBufCC26XX_HWAttrs{
522  uint32_t swiPriority;
536  uint8_t intPriority;
540 
541 
542 
548 typedef struct ADCBufCC26XX_Object{
549  /* ADC control variables */
550  bool isOpen;
555  uint8_t currentChannel;
556  ADCBufCC26XX_Reference_Source refSource;
557  ADCBufCC26XX_Sampling_Mode samplingMode;
558  ADCBufCC26XX_Sampling_Duration samplingDuration;
562  uint16_t *activeSampleBuffer;
564  /* ADC SYS/BIOS objects */
565  HwiP_Struct hwi;
566  SwiP_Struct swi;
567  SemaphoreP_Struct conversionComplete;
571  /* PIN driver state object and handle */
575  /* UDMA driver handle */
578  /* GPTimer driver handle */
581  uint32_t semaphoreTimeout;
582  uint32_t samplingFrequency;
584 
585 /*
586  * =============================================================================
587  * Functions
588  * =============================================================================
589  */
590 
591 
592 #ifdef __cplusplus
593 }
594 #endif
595 
596 #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:390
Definition: ADCBufCC26XX.h:391
Definition: ADCBufCC26XX.h:442
Definition: ADCBufCC26XX.h:404
GPTimerCC26XX_Handle timerHandle
Definition: ADCBufCC26XX.h:579
GPTimer driver implementation for CC26XX/CC13XX.
ADCBufCC26XX_Reference_Source refSource
Definition: ADCBufCC26XX.h:477
struct ADCBufCC26XX_Object * ADCBufCC26XX_Handle
bool inputScalingEnabled
Definition: ADCBufCC26XX.h:493
bool adcSemaphoreInPossession
Definition: ADCBufCC26XX.h:554
Definition: ADCBufCC26XX.h:408
bool isOpen
Definition: ADCBufCC26XX.h:550
ADCBufCC26XX Hardware Attributes.
Definition: ADCBufCC26XX.h:516
ADCBuf_Return_Mode returnMode
Definition: ADCBufCC26XX.h:561
Definition: ADCBufCC26XX.h:415
Power Manager.
Analog to Digital Conversion Buffer (ADCBuf) Input Driver.
Definition: ADCBufCC26XX.h:412
ADCBufCC26XX_Sampling_Mode samplingMode
Definition: ADCBufCC26XX.h:475
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:522
UDMACC26XX Global configuration.
Definition: UDMACC26XX.h:231
Power manager interface for CC26XX/CC13XX.
uint32_t semaphoreTimeout
Definition: ADCBufCC26XX.h:581
CC26XX specfic extension to ADCBuf_Params.
Definition: ADCBufCC26XX.h:471
PIN_Handle pinHandle
Definition: ADCBufCC26XX.h:573
Definition: ADCBufCC26XX.h:409
uint8_t intPriority
ADC peripheral&#39;s interrupt priority.
Definition: ADCBufCC26XX.h:536
ADCBufCC26XX_Reference_Source refSource
Definition: ADCBufCC26XX.h:556
Definition: ADCBufCC26XX.h:411
bool inputScalingEnabled
Definition: ADCBufCC26XX.h:552
Device-specific pin & GPIO driver for CC26xx family [def].
ADCBufCC26XX_Sampling_Duration samplingDuration
Definition: ADCBufCC26XX.h:473
Definition: ADCBufCC26XX.h:410
struct ADCBufCC26XX_Object ADCBufCC26XX_Object
ADCBufCC26XX Object.
bool keepADCSemaphore
Definition: ADCBufCC26XX.h:553
ADCBufCC26XX_Sampling_Duration samplingDuration
Definition: ADCBufCC26XX.h:558
ADCBuf_Callback callbackFxn
Definition: ADCBufCC26XX.h:559
ADCBuf_Recurrence_Mode recurrenceMode
Definition: ADCBufCC26XX.h:560
Definition: ADCBufCC26XX.h:413
Definition: ADCBufCC26XX.h:416
The definition of an ADCBuf function table that contains the required set of functions to control a s...
Definition: ADCBuf.h:600
Definition: ADCBufCC26XX.h:392
UDMACC26XX driver implementation.
Definition: ADCBufCC26XX.h:407
Definition: ADCBufCC26XX.h:441
struct ADCBufCC26XX_ParamsExtension ADCBufCC26XX_ParamsExtension
CC26XX specfic extension to ADCBuf_Params.
ADCBufCC26XX_Reference_Source
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCBufCC26XX.h:440
UDMACC26XX_Handle udmaHandle
Definition: ADCBufCC26XX.h:576
Definition: ADCBufCC26XX.h:405
bool conversionInProgress
Definition: ADCBufCC26XX.h:551
SemaphoreP_Struct conversionComplete
Definition: ADCBufCC26XX.h:567
uint8_t currentChannel
Definition: ADCBufCC26XX.h:555
struct ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_AdcChannelLutEntry
Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal...
ADCBufCC26XX_AdcChannelLutEntry const * adcChannelLut
Definition: ADCBufCC26XX.h:538
GPTimer Global configuration.
Definition: GPTimerCC26XX.h:406
underlying data structure for type PIN_State
Definition: PIN.h:707
ADCBufCC26XX_Sampling_Mode samplingMode
Definition: ADCBufCC26XX.h:557
ADCBuf_Recurrence_Mode
Recurrence behavior of a ADCBuf_Conversion specified in the ADCBuf_Params.
Definition: ADCBuf.h:404
ADCBuf_Return_Mode
Return behavior for ADCBuf_convert() specified in the ADCBuf_Params.
Definition: ADCBuf.h:446
uint8_t dio
Definition: ADCBufCC26XX.h:460
PIN_State pinState
Definition: ADCBufCC26XX.h:572
ADCBuf_Conversion * currentConversion
Definition: ADCBufCC26XX.h:569
struct ADCBufCC26XX_HWAttrs ADCBufCC26XX_HWAttrs
ADCBufCC26XX Hardware Attributes.
SwiP_Struct swi
Definition: ADCBufCC26XX.h:566
uint32_t samplingFrequency
Definition: ADCBufCC26XX.h:582
void(* ADCBuf_Callback)(ADCBuf_Handle handle, ADCBuf_Conversion *conversion, void *completedADCBuffer, uint32_t completedChannel)
The definition of a callback function.
Definition: ADCBuf.h:391
Defines a conversion to be used with ADCBuf_convert().
Definition: ADCBuf.h:315
uint8_t compBInput
Definition: ADCBufCC26XX.h:461
Definition: ADCBufCC26XX.h:406
Definition: ADCBufCC26XX.h:414
ADCBufCC26XX Object.
Definition: ADCBufCC26XX.h:548
const ADCBuf_FxnTable ADCBufCC26XX_fxnTable
HwiP_Struct hwi
Definition: ADCBufCC26XX.h:565
Table entry that maps a virtual adc channel to a dio and its corresponding internal analogue signal...
Definition: ADCBufCC26XX.h:459
Generic PIN & GPIO driver.
uint16_t * activeSampleBuffer
Definition: ADCBufCC26XX.h:562
ADCBufCC26XX_Sampling_Duration
Amount of time the ADC spends sampling the analogue input.
Definition: ADCBufCC26XX.h:403
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale