ADCWFF3.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024-2025, 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 ADCWFF3.h
34  * @brief ADC driver implementation for the ADC peripheral on Wi-Fi F3
35  * devices
36  *
37  * This ADC driver implementation is designed to operate on a ADC peripheral
38  * for Wi-Fi F3 devices.
39  *
40  * Refer to @ref ADC.h for a complete description of APIs & example of use.
41  *
42  * # Limitations #
43  *
44  * ## #ADC_Params Attributes Limitations ##
45  *
46  * Some attributes in the #ADC_Params structure have a limited set of supported
47  * values. These limitations are described below:
48  * - #ADC_Params.isProtected
49  * - Must be true. If this is false, #ADC_open() will fail and return NULL.
50  *
51  ******************************************************************************
52  */
53 #ifndef ti_drivers_adc_ADCWFF3__include
54 #define ti_drivers_adc_ADCWFF3__include
55 
56 #include <stdint.h>
57 #include <stdbool.h>
58 
59 #include <ti/drivers/ADC.h>
60 #include <ti/drivers/Power.h>
61 
62 #include <ti/devices/DeviceFamily.h>
63 #include DeviceFamily_constructPath(driverlib/adc.h)
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
82 typedef enum
83 {
84  ADCWFF3_INTERNAL_REFERENCE = ADC_INTERNAL_REFERENCE,
85  ADCWFF3_VDDA_REFERENCE = ADC_VDDA_REFERENCE,
86  ADCWFF3_EXTERNAL_REFERENCE = ADC_EXTERNAL_REFERENCE
88 
94 typedef enum
95 {
97  ADCWFF3_SAMPLE_CLK_SOC_CLK = ADC_SAMPLE_CLK_SOC_CLK,
99  ADCWFF3_SAMPLE_CLK_HFXT = ADC_SAMPLE_CLK_HFXT,
101  ADCWFF3_SAMPLE_CLK_SOC_PLL_CLK_DIV = ADC_SAMPLE_CLK_SOC_PLL_CLK_DIV
103 
109 typedef enum
110 {
111  ADCWFF3_CLKDIV_1 = ADC_CLOCK_DIVIDER_1,
112  ADCWFF3_CLKDIV_2 = ADC_CLOCK_DIVIDER_2,
113  ADCWFF3_CLKDIV_4 = ADC_CLOCK_DIVIDER_4,
114  ADCWFF3_CLKDIV_8 = ADC_CLOCK_DIVIDER_8,
115  ADCWFF3_CLKDIV_16 = ADC_CLOCK_DIVIDER_16,
116  ADCWFF3_CLKDIV_24 = ADC_CLOCK_DIVIDER_24,
117  ADCWFF3_CLKDIV_32 = ADC_CLOCK_DIVIDER_32,
118  ADCWFF3_CLKDIV_48 = ADC_CLOCK_DIVIDER_48
120 
126 typedef enum
127 {
128  ADCWFF3_FULL_SCALE_RANGE_0V0_3V3 = ADC_FULL_SCALE_RANGE_0V0_3V3,
129  ADCWFF3_FULL_SCALE_RANGE_0V1_3V3 = ADC_FULL_SCALE_RANGE_0V1_3V3,
130  ADCWFF3_FULL_SCALE_RANGE_0V0_3V2 = ADC_FULL_SCALE_RANGE_0V0_3V2,
131  ADCWFF3_FULL_SCALE_RANGE_0V0_1V8 = ADC_FULL_SCALE_RANGE_0V0_1V8
133 
134 /* ADC function table pointer */
135 extern const ADC_FxnTable ADCWFF3_fxnTable;
136 
143 typedef struct
144 {
146  uint8_t adcInputDIO;
150  ADCWFF3_ReferenceSource refSource;
154  ADCWFF3_ClockDivider adcClkDivider;
156  ADCWFF3_SampleClockSource sampleClkSrc;
158  ADCWFF3_FullScaleRange fullScaleRange;
159 
161 
167 typedef struct
168 {
170  bool isOpen;
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif /* ti_drivers_adc_ADCWFF3__include */
ADCWFF3_ReferenceSource refSource
Definition: ADCWFF3.h:150
Definition: ADCWFF3.h:112
Definition: ADCWFF3.h:116
Definition: ADCWFF3.h:131
ADCWFF3_ClockDivider adcClkDivider
Definition: ADCWFF3.h:154
Power Manager.
Definition: ADCWFF3.h:114
Definition: ADCWFF3.h:86
ADCWFF3_FullScaleRange
ADC full scale range.
Definition: ADCWFF3.h:126
Definition: ADCWFF3.h:128
Power_NotifyObj postNotify
Definition: ADCWFF3.h:172
Definition: ADCWFF3.h:129
Definition: ADCWFF3.h:118
ADCWFF3 Hardware attributes These fields are used by driverlib APIs and therefore must be populated b...
Definition: ADCWFF3.h:143
bool isOpen
Definition: ADCWFF3.h:170
const ADC_FxnTable ADCWFF3_fxnTable
Definition: ADCWFF3.h:97
Definition: ADCWFF3.h:115
ADCWFF3_FullScaleRange fullScaleRange
Definition: ADCWFF3.h:158
Analog to Digital Conversion (ADC) Input Driver.
Definition: ADCWFF3.h:99
ADCWFF3_ReferenceSource
Specifies the source of the ADC reference voltage.
Definition: ADCWFF3.h:82
Power notify object structure.
Definition: Power.h:441
The definition of an ADC function table that contains the required set of functions to control a spec...
Definition: ADC.h:354
uint8_t internalChannel
Definition: ADCWFF3.h:148
uint16_t samplingDuration
Definition: ADCWFF3.h:152
Definition: ADCWFF3.h:130
uint8_t adcInputDIO
Definition: ADCWFF3.h:146
Definition: ADCWFF3.h:101
Definition: ADCWFF3.h:85
ADCWFF3 Object.
Definition: ADCWFF3.h:167
ADCWFF3_ClockDivider
ADC clock-divider.
Definition: ADCWFF3.h:109
Definition: ADCWFF3.h:111
ADCWFF3_SampleClockSource sampleClkSrc
Definition: ADCWFF3.h:156
Definition: ADCWFF3.h:84
Definition: ADCWFF3.h:117
Definition: ADCWFF3.h:113
ADCWFF3_SampleClockSource
ADC sample clock source.
Definition: ADCWFF3.h:94
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale