DACCC26X2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2022, 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 DACCC26X2.h
34  * @brief DAC driver implementation for the DAC peripheral on CC26X2
35  *
36  * This DAC driver implementation is designed to operate on a DAC peripheral
37  * for CC26X2.
38  *
39  * Refer to @ref DAC.h for a complete description of APIs & example of use.
40  *
41  ******************************************************************************
42  */
43 #ifndef ti_drivers_dac_DACCC26X2__include
44 #define ti_drivers_dac_DACCC26X2__include
45 
46 #include <ti/drivers/DAC.h>
47 #include <ti/drivers/GPIO.h>
48 #include <ti/drivers/Power.h>
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
60 typedef enum
61 {
63  DAC_VREF_DCOUPL = AUXDAC_VREF_SEL_DCOUPL,
65  DAC_VREF_ADCREF = AUXDAC_VREF_SEL_ADCREF,
67  DAC_VREF_VDDS = AUXDAC_VREF_SEL_VDDS,
69 
76 typedef struct
77 {
79  uint_least8_t outputPin;
81  DAC_VrefSource dacVrefSource;
83  uint8_t dacCompAInput;
89 
95 typedef struct
96 {
98  bool isEnabled;
100  bool isOpen;
102  uint32_t currCode;
104  uint32_t dacOutputMin;
106  uint32_t dacOutputMax;
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif /* ti_drivers_dac_DACCC26X2__include */
DACCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
Definition: DACCC26X2.h:76
uint8_t dacSmplClkDivider
Definition: DACCC26X2.h:85
uint32_t currCode
Definition: DACCC26X2.h:102
Power Manager.
uint_least8_t outputPin
Definition: DACCC26X2.h:79
Power manager interface for CC26XX/CC13XX.
DAC_VrefSource
DAC voltage reference setting.
Definition: DACCC26X2.h:60
uint32_t dacOutputMax
Definition: DACCC26X2.h:106
DACCC26XX Object.
Definition: DACCC26X2.h:95
bool dacPrecharge
Definition: DACCC26X2.h:87
Digital to Analog Conversion (DAC) Output Driver.
uint32_t dacOutputMin
Definition: DACCC26X2.h:104
uint8_t dacCompAInput
Definition: DACCC26X2.h:83
General Purpose I/O driver interface.
bool isOpen
Definition: DACCC26X2.h:100
Definition: DACCC26X2.h:63
DAC_VrefSource dacVrefSource
Definition: DACCC26X2.h:81
Definition: DACCC26X2.h:67
Definition: DACCC26X2.h:65
bool isEnabled
Definition: DACCC26X2.h:98
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale