ref_a.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2  * Copyright (c) 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  * --/COPYRIGHT--*/
32 #ifndef __REF_B_H__
33 #define __REF_B_H__
34 
35 //*****************************************************************************
36 //
39 //
40 //*****************************************************************************
41 
42 #include <ti/devices/msp432p4xx/inc/msp.h>
43 #include <stdbool.h>
44 #include <stdint.h>
45 
46 //*****************************************************************************
47 //
48 // If building with a C++ compiler, make all of the definitions in this header
49 // have a C binding.
50 //
51 //*****************************************************************************
52 #ifdef __cplusplus
53 extern "C"
54 {
55 #endif
56 
57 //*****************************************************************************
58 //
59 //The following are values that can be passed to Ref_setReferenceVoltage()
60 //in the referenceVoltageSelect parameter.
61 //
62 //*****************************************************************************
63 #define REF_A_VREF1_2V REF_A_CTL0_VSEL_0
64 #define REF_A_VREF1_45V REF_A_CTL0_VSEL_1
65 #define REF_A_VREF2_5V REF_A_CTL0_VSEL_3
66 
67 //*****************************************************************************
68 //
69 //The following are values that are returned by Ref_getBandgapMode().
70 //
71 //*****************************************************************************
72 #define REF_A_STATICMODE 0x0
73 #define REF_A_SAMPLEMODE REF_A_CTL0_BGMODE
74 
75 //*****************************************************************************
76 //
94 //
95 //*****************************************************************************
96 extern void REF_A_setReferenceVoltage(uint_fast8_t referenceVoltageSelect);
97 
98 //*****************************************************************************
99 //
111 //
112 //*****************************************************************************
113 extern void REF_A_disableTempSensor(void);
114 
115 //*****************************************************************************
116 //
127 //
128 //*****************************************************************************
129 extern void REF_A_enableTempSensor(void);
130 
131 //*****************************************************************************
132 //
145 //
146 //*****************************************************************************
147 extern void REF_A_enableReferenceVoltageOutput(void);
148 
149 //*****************************************************************************
150 //
160 //
161 //*****************************************************************************
162 extern void REF_A_disableReferenceVoltageOutput(void);
163 
164 //*****************************************************************************
165 //
177 //
178 //*****************************************************************************
179 extern void REF_A_enableReferenceVoltage(void);
180 
181 //*****************************************************************************
182 //
191 //
192 //*****************************************************************************
193 extern void REF_A_disableReferenceVoltage(void);
194 
195 //*****************************************************************************
196 //
210 //
211 //*****************************************************************************
212 extern uint_fast8_t REF_A_getBandgapMode(void);
213 
214 //*****************************************************************************
215 //
223 //
224 //*****************************************************************************
225 extern bool REF_A_isBandgapActive(void);
226 
227 //*****************************************************************************
228 //
236 //*****************************************************************************
237 extern bool REF_A_isRefGenBusy(void);
238 
239 //*****************************************************************************
240 //
248 //
249 //*****************************************************************************
250 extern bool REF_A_isRefGenActive(void);
251 
252 //*****************************************************************************
253 //
262 //
263 //*****************************************************************************
264 extern bool REF_A_getBufferedBandgapVoltageStatus(void);
265 
266 //*****************************************************************************
267 //
276 //
277 //*****************************************************************************
279 
280 //*****************************************************************************
281 //
290 //
291 //*****************************************************************************
293 
294 //*****************************************************************************
295 //
304 //
305 //*****************************************************************************
307 
308 /* Defines for future devices that might have multiple instances */
309 #define REF_A_setReferenceVoltageMultipleInstance(a,b) REF_A_setReferenceVoltage(b)
310 #define REF_A_disableTempSensorMultipleInstance(a) REF_A_disableTempSensor()
311 #define REF_A_enableTempSensorMultipleInstance(a) REF_A_enableTempSensor()
312 #define REF_A_enableReferenceVoltageOutputMultipleInstance(a) REF_A_enableReferenceVoltageOutput()
313 #define REF_A_disableReferenceVoltageOutputMultipleInstance(a) REF_A_disableReferenceVoltageOutput()
314 #define REF_A_enableReferenceVoltageMultipleInstance(a) REF_A_enableReferenceVoltage()
315 #define REF_A_disableReferenceVoltageMultipleInstance(a) REF_A_disableReferenceVoltage()
316 #define REF_A_getBandgapModeMultipleInstance(a) REF_A_getBandgapMode()
317 #define REF_A_isBandgapActiveMultipleInstance(a) REF_A_isBandgapActive()
318 #define REF_A_isRefGenBusyMultipleInstance(a) REF_A_isRefGenBusy()
319 #define REF_A_isRefGenActiveMultipleInstance(a) REF_A_isRefGenActive()
320 #define REF_A_getBufferedBandgapVoltageStatusMultipleInstance(a) REF_A_getBufferedBandgapVoltageStatus()
321 #define REF_A_getVariableReferenceVoltageStatusMultipleInstance(a) REF_A_getVariableReferenceVoltageStatus()
322 #define REF_A_setReferenceVoltageOneTimeTriggerMultipleInstance(a) REF_A_setReferenceVoltageOneTimeTrigger()
323 #define REF_A_setBufferedBandgapVoltageOneTimeTriggerMultipleInstance(a) REF_A_setBufferedBandgapVoltageOneTimeTrigger()
324 
325 //*****************************************************************************
326 //
327 // Mark the end of the C bindings section for C++ compilers.
328 //
329 //*****************************************************************************
330 #ifdef __cplusplus
331 }
332 #endif
333 
334 //*****************************************************************************
335 //
336 // Close the Doxygen group.
338 //
339 //*****************************************************************************
340 
341 #endif // __REF_A_H__
bool REF_A_getBufferedBandgapVoltageStatus(void)
Definition: ref_a.c:92
void REF_A_setReferenceVoltageOneTimeTrigger(void)
Definition: ref_a.c:102
void REF_A_setBufferedBandgapVoltageOneTimeTrigger(void)
Definition: ref_a.c:107
void REF_A_enableReferenceVoltageOutput(void)
Definition: ref_a.c:52
bool REF_A_getVariableReferenceVoltageStatus(void)
Definition: ref_a.c:97
void REF_A_disableReferenceVoltageOutput(void)
Definition: ref_a.c:57
void REF_A_disableTempSensor(void)
Definition: ref_a.c:42
bool REF_A_isBandgapActive(void)
Definition: ref_a.c:77
uint_fast8_t REF_A_getBandgapMode(void)
Definition: ref_a.c:72
void REF_A_setReferenceVoltage(uint_fast8_t referenceVoltageSelect)
Definition: ref_a.c:35
void REF_A_enableReferenceVoltage(void)
Definition: ref_a.c:62
void REF_A_disableReferenceVoltage(void)
Definition: ref_a.c:67
void REF_A_enableTempSensor(void)
Definition: ref_a.c:47
bool REF_A_isRefGenBusy(void)
Definition: ref_a.c:82
bool REF_A_isRefGenActive(void)
Definition: ref_a.c:87

Copyright 2019, Texas Instruments Incorporated