TI-RTOS Drivers  tidrivers_full_2_20_00_08
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 #include <driverlib/aux_adc.h>
66 
77  ADCCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US,
78  ADCCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US,
79  ADCCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US,
80  ADCCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
81  ADCCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US,
82  ADCCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US,
83  ADCCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US,
84  ADCCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
85  ADCCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US,
86  ADCCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS,
87  ADCCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS,
88  ADCCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
89  ADCCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
91 
113  ADCCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED,
114  ADCCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL
116 
124  ADCCC26XX_TRIGGER_MANUAL = AUXADC_TRIGGER_MANUAL,
126 
127 /* ADC function table pointer */
128 extern const ADC_FxnTable ADCCC26XX_fxnTable;
129 
136 typedef struct ADCCC26XX_HWAttrs {
137  uint8_t adcDIO;
138  uint8_t adcCompBInput;
145 
151 typedef struct ADCCC26XX_Object {
154  bool isOpen;
156 
157 
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif /* ti_drivers_adc_ADCCC26XX__include */
ADCCC26XX_Trigger_Source triggerSource
Definition: ADCCC26XX.h:142
Definition: ADCCC26XX.h:89
Definition: ADCCC26XX.h:82
ADCCC26XX_Reference_Source refSource
Definition: ADCCC26XX.h:140
ADCCC26XX Object.
Definition: ADCCC26XX.h:151
Definition: ADCCC26XX.h:113
Power manager interface.
Power manager interface for CC26XX.
struct ADCCC26XX_Object ADCCC26XX_Object
ADCCC26XX Object.
ADCCC26XX_Sampling_Duration
Amount of time the ADC spends sampling the analogue input.
Definition: ADCCC26XX.h:76
const ADC_FxnTable ADCCC26XX_fxnTable
ADCCC26XX_Trigger_Source
List of sources the ADC can be configured to trigger off of.
Definition: ADCCC26XX.h:123
Definition: ADCCC26XX.h:88
Device-specific pin & GPIO driver for CC26xx family [def].
ADC driver interface.
Definition: ADCCC26XX.h:83
Definition: ADCCC26XX.h:86
Definition: ADCCC26XX.h:87
uint8_t adcCompBInput
Definition: ADCCC26XX.h:138
The definition of a ADC function table that contains the required set of functions to control a speci...
Definition: ADC.h:235
Definition: ADCCC26XX.h:78
underlying data structure for type PIN_State
Definition: PIN.h:687
uint8_t adcDIO
Definition: ADCCC26XX.h:137
bool isOpen
Definition: ADCCC26XX.h:154
ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
Definition: ADCCC26XX.h:136
Definition: ADCCC26XX.h:81
Definition: ADCCC26XX.h:77
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:153
PIN_State pinState
Definition: ADCCC26XX.h:152
Definition: ADCCC26XX.h:84
Definition: ADCCC26XX.h:79
bool inputScalingEnabled
Definition: ADCCC26XX.h:139
ADCCC26XX_Sampling_Duration samplingDuration
Definition: ADCCC26XX.h:141
Definition: ADCCC26XX.h:124
Definition: ADCCC26XX.h:80
Generic PIN & GPIO driver.
Definition: ADCCC26XX.h:85
ADCCC26XX_Reference_Source
Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed in...
Definition: ADCCC26XX.h:112
Definition: ADCCC26XX.h:114
Copyright 2016, Texas Instruments Incorporated