ADCCC26XX.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2017, 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 #include <ti/devices/DeviceFamily.h>
66 #include DeviceFamily_constructPath(driverlib/aux_adc.h)
67 
78  ADCCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US,
79  ADCCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US,
80  ADCCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US,
81  ADCCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
82  ADCCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US,
83  ADCCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US,
84  ADCCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US,
85  ADCCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
86  ADCCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US,
87  ADCCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS,
88  ADCCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS,
89  ADCCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
90  ADCCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
92 
114  ADCCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED,
115  ADCCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL
117 
125  ADCCC26XX_TRIGGER_MANUAL = AUXADC_TRIGGER_MANUAL,
127 
128 /* ADC function table pointer */
129 extern const ADC_FxnTable ADCCC26XX_fxnTable;
130 
137 typedef struct ADCCC26XX_HWAttrs {
138  uint8_t adcDIO;
139  uint8_t adcCompBInput;
142  ADCCC26XX_Reference_Source refSource;
143  ADCCC26XX_Sampling_Duration samplingDuration;
144  ADCCC26XX_Trigger_Source triggerSource;
146 
152 typedef struct ADCCC26XX_Object {
155  bool isOpen;
156  bool isProtected;
158 
159 
160 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif /* ti_drivers_adc_ADCCC26XX__include */
ADCCC26XX_Trigger_Source triggerSource
Definition: ADCCC26XX.h:144
Definition: ADCCC26XX.h:90
Definition: ADCCC26XX.h:83
ADCCC26XX_Reference_Source refSource
Definition: ADCCC26XX.h:142
ADCCC26XX Object.
Definition: ADCCC26XX.h:152
Definition: ADCCC26XX.h:114
Power Manager interface.
bool returnAdjustedVal
Definition: ADCCC26XX.h:140
bool isProtected
Definition: ADCCC26XX.h:156
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:77
const ADC_FxnTable ADCCC26XX_fxnTable
ADCCC26XX_Trigger_Source
List of sources the ADC can be configured to trigger off of.
Definition: ADCCC26XX.h:124
Definition: ADCCC26XX.h:89
Device-specific pin & GPIO driver for CC26xx family [def].
ADC driver interface.
Definition: ADCCC26XX.h:84
Definition: ADCCC26XX.h:87
Definition: ADCCC26XX.h:88
The definition of a ADC function table that contains the required set of functions to control a speci...
Definition: ADC.h:273
uint8_t adcCompBInput
Definition: ADCCC26XX.h:139
Definition: ADCCC26XX.h:79
underlying data structure for type PIN_State
Definition: PIN.h:707
uint8_t adcDIO
Definition: ADCCC26XX.h:138
bool isOpen
Definition: ADCCC26XX.h:155
ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
Definition: ADCCC26XX.h:137
Definition: ADCCC26XX.h:82
Definition: ADCCC26XX.h:78
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:154
PIN_State pinState
Definition: ADCCC26XX.h:153
Definition: ADCCC26XX.h:85
Definition: ADCCC26XX.h:80
bool inputScalingEnabled
Definition: ADCCC26XX.h:141
ADCCC26XX_Sampling_Duration samplingDuration
Definition: ADCCC26XX.h:143
Definition: ADCCC26XX.h:125
Definition: ADCCC26XX.h:81
Generic PIN & GPIO driver.
Definition: ADCCC26XX.h:86
ADCCC26XX_Reference_Source
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCCC26XX.h:113
Definition: ADCCC26XX.h:115
Copyright 2018, Texas Instruments Incorporated