ADCCC26XX.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-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 ADCCC26XX.h
34  * @brief ADC driver implementation for the ADC peripheral on CC26XX
35  *
36  * This ADC driver implementation is designed to operate on a ADC peripheral
37  * for CC26XX.
38  *
39  * Refer to @ref ADC.h for a complete description of APIs & example of use.
40  *
41  ******************************************************************************
42  */
43 #ifndef ti_drivers_adc_ADCCC26XX__include
44 #define ti_drivers_adc_ADCCC26XX__include
45 
46 #include <stdint.h>
47 #include <stdbool.h>
48 
49 #include <ti/drivers/ADC.h>
50 #include <ti/drivers/PIN.h>
52 #include <ti/drivers/Power.h>
54 
55 #include <ti/devices/DeviceFamily.h>
56 #include DeviceFamily_constructPath(driverlib/aux_adc.h)
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
72  ADCCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US,
73  ADCCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US,
74  ADCCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US,
75  ADCCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
76  ADCCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US,
77  ADCCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US,
78  ADCCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US,
79  ADCCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
80  ADCCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US,
81  ADCCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS,
82  ADCCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS,
83  ADCCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
84  ADCCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
86 
108  ADCCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED,
109  ADCCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL
111 
119  ADCCC26XX_TRIGGER_MANUAL = AUXADC_TRIGGER_MANUAL,
121 
122 /* ADC function table pointer */
123 extern const ADC_FxnTable ADCCC26XX_fxnTable;
124 
131 typedef struct ADCCC26XX_HWAttrs {
132  uint8_t adcDIO;
133  uint8_t adcCompBInput;
136  ADCCC26XX_Reference_Source refSource;
137  ADCCC26XX_Sampling_Duration samplingDuration;
138  ADCCC26XX_Trigger_Source triggerSource;
140 
146 typedef struct ADCCC26XX_Object {
149  bool isOpen;
150  bool isProtected;
152 
153 
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif /* ti_drivers_adc_ADCCC26XX__include */
ADCCC26XX_Trigger_Source triggerSource
Definition: ADCCC26XX.h:138
Definition: ADCCC26XX.h:84
Definition: ADCCC26XX.h:77
ADCCC26XX_Reference_Source refSource
Definition: ADCCC26XX.h:136
ADCCC26XX Object.
Definition: ADCCC26XX.h:146
Definition: ADCCC26XX.h:108
Power Manager.
bool returnAdjustedVal
Definition: ADCCC26XX.h:134
bool isProtected
Definition: ADCCC26XX.h:150
Power manager interface for CC26XX/CC13XX.
struct ADCCC26XX_Object ADCCC26XX_Object
ADCCC26XX Object.
ADCCC26XX_Sampling_Duration
Amount of time the ADC spends sampling the analogue input.
Definition: ADCCC26XX.h:71
const ADC_FxnTable ADCCC26XX_fxnTable
ADCCC26XX_Trigger_Source
List of sources the ADC can be configured to trigger off of.
Definition: ADCCC26XX.h:118
Definition: ADCCC26XX.h:83
Device-specific pin & GPIO driver for CC26xx family [def].
Analog to Digital Conversion (ADC) Input Driver.
Definition: ADCCC26XX.h:78
Definition: ADCCC26XX.h:81
Definition: ADCCC26XX.h:82
uint8_t adcCompBInput
Definition: ADCCC26XX.h:133
The definition of an ADC function table that contains the required set of functions to control a spec...
Definition: ADC.h:319
Definition: ADCCC26XX.h:73
underlying data structure for type PIN_State
Definition: PIN.h:707
uint8_t adcDIO
Definition: ADCCC26XX.h:132
bool isOpen
Definition: ADCCC26XX.h:149
ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
Definition: ADCCC26XX.h:131
Definition: ADCCC26XX.h:76
Definition: ADCCC26XX.h:72
struct ADCCC26XX_HWAttrs ADCCC26XX_HWAttrs
ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
PIN_Handle pinHandle
Definition: ADCCC26XX.h:148
PIN_State pinState
Definition: ADCCC26XX.h:147
Definition: ADCCC26XX.h:79
Definition: ADCCC26XX.h:74
bool inputScalingEnabled
Definition: ADCCC26XX.h:135
ADCCC26XX_Sampling_Duration samplingDuration
Definition: ADCCC26XX.h:137
Definition: ADCCC26XX.h:119
Definition: ADCCC26XX.h:75
Generic PIN & GPIO driver.
Definition: ADCCC26XX.h:80
ADCCC26XX_Reference_Source
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCCC26XX.h:107
Definition: ADCCC26XX.h:109
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale