fpu.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 __FPU_H__
33 #define __FPU_H__
34 
35 //*****************************************************************************
36 //
40 //
41 //*****************************************************************************
42 
43 //*****************************************************************************
44 //
45 // If building with a C++ compiler, make all of the definitions in this header
46 // have a C binding.
47 //
48 //*****************************************************************************
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 #include <stdint.h>
55 #include <ti/devices/msp432p4xx/inc/msp.h>
56 
57 //*****************************************************************************
58 //
59 // Values that can be passed to FPUHalfPrecisionSet as the mode parameter.
60 //
61 //*****************************************************************************
62 #define FPU_HALF_IEEE 0x00000000
63 #define FPU_HALF_ALTERNATE 0x04000000
64 
65 //*****************************************************************************
66 //
67 // Values that can be passed to FPU_setNaNMode as the mode parameter.
68 //
69 //*****************************************************************************
70 #define FPU_NAN_PROPAGATE 0x00000000
71 #define FPU_NAN_DEFAULT 0x02000000
72 
73 //*****************************************************************************
74 //
75 // Values that can be passed to FPU_setFlushToZeroMode as the mode parameter.
76 //
77 //*****************************************************************************
78 #define FPU_FLUSH_TO_ZERO_DIS 0x00000000
79 #define FPU_FLUSH_TO_ZERO_EN 0x01000000
80 
81 //*****************************************************************************
82 //
83 // Values that can be passed to FPU_setRoundingMode as the mode parameter.
84 //
85 //*****************************************************************************
86 #define FPU_ROUND_NEAREST 0x00000000
87 #define FPU_ROUND_POS_INF 0x00400000
88 #define FPU_ROUND_NEG_INF 0x00800000
89 #define FPU_ROUND_ZERO 0x00c00000
90 
91 //*****************************************************************************
92 //
101 //
102 //*****************************************************************************
103 extern void FPU_enableModule(void);
104 
105 //*****************************************************************************
106 //
113 //
114 //*****************************************************************************
115 extern void FPU_disableModule(void);
116 
117 //*****************************************************************************
118 //
135 //
136 //*****************************************************************************
137 extern void FPU_enableStacking(void);
138 
139 //*****************************************************************************
140 //
158 //
159 //*****************************************************************************
160 extern void FPU_enableLazyStacking(void);
161 
162 //*****************************************************************************
163 //
172 //
173 //*****************************************************************************
174 extern void FPU_disableStacking(void);
175 
176 //*****************************************************************************
177 //
193 //
194 //*****************************************************************************
195 extern void FPU_setHalfPrecisionMode(uint32_t mode);
196 
197 //*****************************************************************************
198 //
212 //
213 //*****************************************************************************
214 extern void FPU_setNaNMode(uint32_t mode);
215 
216 //*****************************************************************************
217 //
233 //
234 //*****************************************************************************
235 extern void FPU_setFlushToZeroMode(uint32_t mode);
236 
237 //*****************************************************************************
238 //
258 //
259 //*****************************************************************************
260 extern void FPU_setRoundingMode(uint32_t mode);
261 
262 //*****************************************************************************
263 //
264 // Mark the end of the C bindings section for C++ compilers.
265 //
266 //*****************************************************************************
267 #ifdef __cplusplus
268 }
269 #endif
270 
271 
272 //*****************************************************************************
273 //
274 // Close the Doxygen group.
276 //
277 //*****************************************************************************
278 
279 
280 #endif // __FPU_H__
void FPU_enableStacking(void)
Definition: fpu.c:51
void FPU_disableStacking(void)
Definition: fpu.c:70
void FPU_enableModule(void)
Definition: fpu.c:34
void FPU_setHalfPrecisionMode(uint32_t mode)
Definition: fpu.c:79
void FPU_setRoundingMode(uint32_t mode)
Definition: fpu.c:103
void FPU_setFlushToZeroMode(uint32_t mode)
Definition: fpu.c:95
void FPU_setNaNMode(uint32_t mode)
Definition: fpu.c:87
void FPU_enableLazyStacking(void)
Definition: fpu.c:61
void FPU_disableModule(void)
Definition: fpu.c:43

Copyright 2018, Texas Instruments Incorporated