DACCC26X2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021, 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/PIN.h>
49 #include <ti/drivers/Power.h>
51 
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 
63 typedef enum {
65  DAC_VREF_DCOUPL = AUXDAC_VREF_SEL_DCOUPL,
67  DAC_VREF_ADCREF = AUXDAC_VREF_SEL_ADCREF,
69  DAC_VREF_VDDS = AUXDAC_VREF_SEL_VDDS,
71 
78 typedef struct {
82  DAC_VrefSource dacVrefSource;
84  uint8_t dacCompAInput;
87 
89 
95 typedef struct {
97  bool isEnabled;
103  bool isOpen;
105  uint32_t currCode;
107  uint32_t dacOutputMin;
109  uint32_t dacOutputMax;
111 
112 
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif /* ti_drivers_dac_DACCC26X2__include */
uint8_t PIN_Id
Pin identifier data type.
Definition: PIN.h:578
DACCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated...
Definition: DACCC26X2.h:78
uint32_t currCode
Definition: DACCC26X2.h:105
Power Manager.
Power manager interface for CC26XX/CC13XX.
DAC_VrefSource
DAC voltage reference setting.
Definition: DACCC26X2.h:63
PIN_Id pinDAC
Definition: DACCC26X2.h:80
Device-specific pin & GPIO driver for CC26xx family [def].
uint32_t dacOutputMax
Definition: DACCC26X2.h:109
DACCC26XX Object.
Definition: DACCC26X2.h:95
bool dacPrecharge
Definition: DACCC26X2.h:86
Digital to Analog Conversion (DAC) Output Driver.
uint32_t dacOutputMin
Definition: DACCC26X2.h:107
underlying data structure for type PIN_State
Definition: PIN.h:708
uint8_t dacCompAInput
Definition: DACCC26X2.h:84
bool isOpen
Definition: DACCC26X2.h:103
PIN_Handle pinHandle
Definition: DACCC26X2.h:101
Definition: DACCC26X2.h:65
PIN_State pinState
Definition: DACCC26X2.h:99
DAC_VrefSource dacVrefSource
Definition: DACCC26X2.h:82
Definition: DACCC26X2.h:69
Definition: DACCC26X2.h:67
Generic PIN & GPIO driver.
bool isEnabled
Definition: DACCC26X2.h:97
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale