fpu.h
Go to the documentation of this file.
1 #ifndef __FPU_H__
2 #define __FPU_H__
3 
4 //*****************************************************************************
5 //
9 //
10 //*****************************************************************************
11 
12 //*****************************************************************************
13 //
14 // If building with a C++ compiler, make all of the definitions in this header
15 // have a C binding.
16 //
17 //*****************************************************************************
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include <stdint.h>
24 #include "register_remap.h"
25 #include <msp432.h>
26 
27 //*****************************************************************************
28 //
29 // Values that can be passed to FPUHalfPrecisionSet as the mode parameter.
30 //
31 //*****************************************************************************
32 #define FPU_HALF_IEEE 0x00000000
33 #define FPU_HALF_ALTERNATE 0x04000000
34 
35 //*****************************************************************************
36 //
37 // Values that can be passed to FPU_setNaNMode as the mode parameter.
38 //
39 //*****************************************************************************
40 #define FPU_NAN_PROPAGATE 0x00000000
41 #define FPU_NAN_DEFAULT 0x02000000
42 
43 //*****************************************************************************
44 //
45 // Values that can be passed to FPU_setFlushToZeroMode as the mode parameter.
46 //
47 //*****************************************************************************
48 #define FPU_FLUSH_TO_ZERO_DIS 0x00000000
49 #define FPU_FLUSH_TO_ZERO_EN 0x01000000
50 
51 //*****************************************************************************
52 //
53 // Values that can be passed to FPU_setRoundingMode as the mode parameter.
54 //
55 //*****************************************************************************
56 #define FPU_ROUND_NEAREST 0x00000000
57 #define FPU_ROUND_POS_INF 0x00400000
58 #define FPU_ROUND_NEG_INF 0x00800000
59 #define FPU_ROUND_ZERO 0x00c00000
60 
61 #define FPU_CPAC_CP11_M 0x00C00000 // CP11 Coprocessor Access
62 #define FPU_CPAC_CP10_M 0x00300000 // CP10 Coprocessor Access
63 #define FPU_FPDSC_RMODE_M 0x00C00000 // RMODE Bit Default
64 
65 //*****************************************************************************
66 //
75 //
76 //*****************************************************************************
77 extern void FPU_enableModule(void);
78 
79 //*****************************************************************************
80 //
87 //
88 //*****************************************************************************
89 extern void FPU_disableModule(void);
90 
91 //*****************************************************************************
92 //
109 //
110 //*****************************************************************************
111 extern void FPU_enableStacking(void);
112 
113 //*****************************************************************************
114 //
132 //
133 //*****************************************************************************
134 extern void FPU_enableLazyStacking(void);
135 
136 //*****************************************************************************
137 //
146 //
147 //*****************************************************************************
148 extern void FPU_disableStacking(void);
149 
150 //*****************************************************************************
151 //
167 //
168 //*****************************************************************************
169 extern void FPU_setHalfPrecisionMode(uint32_t mode);
170 
171 //*****************************************************************************
172 //
186 //
187 //*****************************************************************************
188 extern void FPU_setNaNMode(uint32_t mode);
189 
190 //*****************************************************************************
191 //
207 //
208 //*****************************************************************************
209 extern void FPU_setFlushToZeroMode(uint32_t mode);
210 
211 //*****************************************************************************
212 //
232 //
233 //*****************************************************************************
234 extern void FPU_setRoundingMode(uint32_t mode);
235 
236 //*****************************************************************************
237 //
238 // Mark the end of the C bindings section for C++ compilers.
239 //
240 //*****************************************************************************
241 #ifdef __cplusplus
242 }
243 #endif
244 
245 
246 //*****************************************************************************
247 //
248 // Close the Doxygen group.
250 //
251 //*****************************************************************************
252 
253 
254 #endif // __FPU_H__
void FPU_enableStacking(void)
Definition: fpu.c:20
void FPU_disableStacking(void)
Definition: fpu.c:39
void FPU_enableModule(void)
Definition: fpu.c:3
void FPU_setHalfPrecisionMode(uint32_t mode)
Definition: fpu.c:48
void FPU_setRoundingMode(uint32_t mode)
Definition: fpu.c:72
void FPU_setFlushToZeroMode(uint32_t mode)
Definition: fpu.c:64
void FPU_setNaNMode(uint32_t mode)
Definition: fpu.c:56
void FPU_enableLazyStacking(void)
Definition: fpu.c:30
void FPU_disableModule(void)
Definition: fpu.c:12

Copyright 2014, Texas Instruments Incorporated