pss.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 __PSS_H__
33 #define __PSS_H__
34 
35 //*****************************************************************************
36 //
39 //
40 //*****************************************************************************
41 
42 //*****************************************************************************
43 //
44 // If building with a C++ compiler, make all of the definitions in this header
45 // have a C binding.
46 //
47 //*****************************************************************************
48 #ifdef __cplusplus
49 extern "C"
50 {
51 #endif
52 
53 #include <stdint.h>
54 #include <ti/devices/msp432p4xx/inc/msp.h>
55 #include <stdbool.h>
56 
57 //*****************************************************************************
58 //
59 // Control specific variables
60 //
61 //*****************************************************************************
62 #define PSS_KEY_VALUE PSS_KEY_KEY_VAL
63 
64 #define PSS_SVSMH PSS_IE_SVSMHIE
65 
66 #define PSS_FULL_PERFORMANCE_MODE 0x01
67 #define PSS_NORMAL_PERFORMANCE_MODE 0x00
68 
69 //*****************************************************************************
70 //
71 // Prototypes for the APIs.
72 //
73 //*****************************************************************************
74 
75 //*****************************************************************************
76 //
83 //
84 //*****************************************************************************
85 extern void PSS_enableHighSidePinToggle(bool activeLow);
86 
87 //*****************************************************************************
88 //
92 //
93 //*****************************************************************************
94 extern void PSS_disableHighSidePinToggle(void);
95 
96 //*****************************************************************************
97 //
101 //
102 //*****************************************************************************
103 extern void PSS_enableHighSide(void);
104 
105 //*****************************************************************************
106 //
110 //
111 //*****************************************************************************
112 extern void PSS_disableHighSide(void);
113 
114 //*****************************************************************************
115 //
126 //
127 //*****************************************************************************
128 extern void PSS_setHighSidePerformanceMode(uint_fast8_t powerMode);
129 
130 //*****************************************************************************
131 //
137 //
138 //*****************************************************************************
139 extern uint_fast8_t PSS_getHighSidePerformanceMode(void);
140 
141 //*****************************************************************************
142 //
146 //
147 //*****************************************************************************
148 extern void PSS_enableHighSideMonitor(void);
149 
150 //*****************************************************************************
151 //
156 //
157 //*****************************************************************************
158 extern void PSS_disableHighSideMonitor(void);
159 
160 //*****************************************************************************
161 //
183 //
184 //*****************************************************************************
185 extern void PSS_setHighSideVoltageTrigger(uint_fast8_t triggerVoltage);
186 
187 //*****************************************************************************
188 //
197 //
198 //*****************************************************************************
199 extern uint_fast8_t PSS_getHighSideVoltageTrigger(void);
200 
201 //*****************************************************************************
202 //
206 //
207 //*****************************************************************************
208 extern void PSS_enableInterrupt(void);
209 
210 //*****************************************************************************
211 //
215 //
216 //*****************************************************************************
217 extern void PSS_disableInterrupt(void);
218 
219 //*****************************************************************************
220 //
225 //*****************************************************************************
226 extern uint32_t PSS_getInterruptStatus(void);
227 
228 //*****************************************************************************
229 //
233 //
234 //*****************************************************************************
235 extern void PSS_clearInterruptFlag(void);
236 
237 
238 //*****************************************************************************
239 //
246 //
247 //*****************************************************************************
248 extern void PSS_enableForcedDCDCOperation(void);
249 
250 
251 //*****************************************************************************
252 //
259 //
260 //*****************************************************************************
261 extern void PSS_disableForcedDCDCOperation(void);
262 
263 //*****************************************************************************
264 //
280 //
281 //*****************************************************************************
282 extern void PSS_registerInterrupt(void (*intHandler)(void));
283 
284 //*****************************************************************************
285 //
296 //
297 //*****************************************************************************
298 extern void PSS_unregisterInterrupt(void);
299 
300 //*****************************************************************************
301 //
302 // Mark the end of the C bindings section for C++ compilers.
303 //
304 //*****************************************************************************
305 #ifdef __cplusplus
306 }
307 #endif
308 
309 //*****************************************************************************
310 //
311 // Close the Doxygen group.
313 //
314 //*****************************************************************************
315 
316 #endif // __PSS_H__
uint_fast8_t PSS_getHighSidePerformanceMode(void)
Definition: pss.c:125
void PSS_clearInterruptFlag(void)
Definition: pss.c:188
void PSS_enableForcedDCDCOperation(void)
Definition: pss.c:52
void PSS_disableHighSidePinToggle(void)
Definition: pss.c:86
void PSS_registerInterrupt(void(*intHandler)(void))
Definition: pss.c:195
void PSS_disableInterrupt(void)
Definition: pss.c:176
void PSS_disableHighSideMonitor(void)
Definition: pss.c:142
uint32_t PSS_getInterruptStatus(void)
Definition: pss.c:183
uint_fast8_t PSS_getHighSideVoltageTrigger(void)
Definition: pss.c:163
void PSS_setHighSidePerformanceMode(uint_fast8_t powerMode)
Definition: pss.c:113
void PSS_disableForcedDCDCOperation(void)
Definition: pss.c:61
void PSS_enableHighSideMonitor(void)
Definition: pss.c:133
void PSS_setHighSideVoltageTrigger(uint_fast8_t triggerVoltage)
Definition: pss.c:151
void PSS_unregisterInterrupt(void)
Definition: pss.c:208
void PSS_enableHighSidePinToggle(bool activeLow)
Definition: pss.c:71
void PSS_enableInterrupt(void)
Definition: pss.c:169
void PSS_disableHighSide(void)
Definition: pss.c:104
void PSS_enableHighSide(void)
Definition: pss.c:95

Copyright 2019, Texas Instruments Incorporated