SimpleLink MCU SDK Driver APIs  tidrivers_cc13xx_cc26xx_3_01_01_03
ADCCC26XX.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, 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  */
49 #ifndef ti_drivers_adc_ADCCC26XX__include
50 #define ti_drivers_adc_ADCCC26XX__include
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 #include <stdint.h>
57 #include <stdbool.h>
58 
59 #include <ti/drivers/ADC.h>
60 #include <ti/drivers/PIN.h>
62 #include <ti/drivers/Power.h>
64 
65 #ifdef DEVICE_FAMILY
66  #undef DEVICE_FAMILY_PATH
67  #define DEVICE_FAMILY_PATH(x) <ti/devices/DEVICE_FAMILY/x>
68 #else
69  #error "You must define DEVICE_FAMILY at the project level as one of cc26x0, cc26x0r2, cc13x0, etc."
70 #endif
71 
72 #include DEVICE_FAMILY_PATH(driverlib/aux_adc.h)
73 
84  ADCCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US,
85  ADCCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US,
86  ADCCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US,
87  ADCCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
88  ADCCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US,
89  ADCCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US,
90  ADCCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US,
91  ADCCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
92  ADCCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US,
93  ADCCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS,
94  ADCCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS,
95  ADCCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
96  ADCCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
98 
120  ADCCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED,
121  ADCCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL
123 
131  ADCCC26XX_TRIGGER_MANUAL = AUXADC_TRIGGER_MANUAL,
133 
134 /* ADC function table pointer */
135 extern const ADC_FxnTable ADCCC26XX_fxnTable;
136 
143 typedef struct ADCCC26XX_HWAttrs {
144  uint8_t adcDIO;
145  uint8_t adcCompBInput;
152 
158 typedef struct ADCCC26XX_Object {
161  bool isOpen;
162  bool isProtected;
164 
165 
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif /* ti_drivers_adc_ADCCC26XX__include */
ADCCC26XX_Trigger_Source triggerSource
Definition: ADCCC26XX.h:149
Definition: ADCCC26XX.h:96
Definition: ADCCC26XX.h:89
ADCCC26XX_Reference_Source refSource
Definition: ADCCC26XX.h:147
ADCCC26XX Object.
Definition: ADCCC26XX.h:158
Definition: ADCCC26XX.h:120
Power manager interface.
bool isProtected
Definition: ADCCC26XX.h:162
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:83
const ADC_FxnTable ADCCC26XX_fxnTable
ADCCC26XX_Trigger_Source
List of sources the ADC can be configured to trigger off of.
Definition: ADCCC26XX.h:130
Definition: ADCCC26XX.h:95
Device-specific pin & GPIO driver for CC26xx family [def].
ADC driver interface.
Definition: ADCCC26XX.h:90
Definition: ADCCC26XX.h:93
Definition: ADCCC26XX.h:94
The definition of a ADC function table that contains the required set of functions to control a speci...
Definition: ADC.h:266
uint8_t adcCompBInput
Definition: ADCCC26XX.h:145
Definition: ADCCC26XX.h:85
underlying data structure for type PIN_State
Definition: PIN.h:687
uint8_t adcDIO
Definition: ADCCC26XX.h:144
bool isOpen
Definition: ADCCC26XX.h:161
ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
Definition: ADCCC26XX.h:143
Definition: ADCCC26XX.h:88
Definition: ADCCC26XX.h:84
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:160
PIN_State pinState
Definition: ADCCC26XX.h:159
Definition: ADCCC26XX.h:91
Definition: ADCCC26XX.h:86
bool inputScalingEnabled
Definition: ADCCC26XX.h:146
ADCCC26XX_Sampling_Duration samplingDuration
Definition: ADCCC26XX.h:148
Definition: ADCCC26XX.h:131
Definition: ADCCC26XX.h:87
Generic PIN & GPIO driver.
Definition: ADCCC26XX.h:92
ADCCC26XX_Reference_Source
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCCC26XX.h:119
Definition: ADCCC26XX.h:121
Copyright 2016, Texas Instruments Incorporated