annotate Common/Drivers/CMSIS_v210/core_cmFunc.h @ 70:6a6116d7b5bb

old (and new) compass support
author heinrichsweikamp
date Tue, 11 Sep 2018 19:29:58 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**************************************************************************//**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 * @file core_cmFunc.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @brief CMSIS Cortex-M Core Function Access Header File
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @version V2.10
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @date 26. July 2011
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @note
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 * @par
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * ARM Limited (ARM) is supplying this software for use with Cortex-M
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 * processor based microcontrollers. This file can be freely distributed
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * within development tools that are supporting such ARM based processors.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * @par
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 ******************************************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 #ifndef __CORE_CMFUNC_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 #define __CORE_CMFUNC_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 /* ########################### Core Function Access ########################### */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 /** \ingroup CMSIS_Core_FunctionInterface
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 #if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 /* ARM armcc specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 #if (__ARMCC_VERSION < 400677)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 /* intrinsic void __enable_irq(); */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 /* intrinsic void __disable_irq(); */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 /** \brief Get Control Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 This function returns the content of the Control Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 \return Control Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 static __INLINE uint32_t __get_CONTROL(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 register uint32_t __regControl __ASM("control");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 return(__regControl);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /** \brief Set Control Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 This function writes the given value to the Control Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 \param [in] control Control Register value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 static __INLINE void __set_CONTROL(uint32_t control)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 register uint32_t __regControl __ASM("control");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 __regControl = control;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 /** \brief Get ISPR Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 This function returns the content of the ISPR Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 \return ISPR Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 static __INLINE uint32_t __get_IPSR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 register uint32_t __regIPSR __ASM("ipsr");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 return(__regIPSR);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 /** \brief Get APSR Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 This function returns the content of the APSR Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 \return APSR Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 static __INLINE uint32_t __get_APSR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 register uint32_t __regAPSR __ASM("apsr");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 return(__regAPSR);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 /** \brief Get xPSR Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 This function returns the content of the xPSR Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 \return xPSR Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 static __INLINE uint32_t __get_xPSR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 register uint32_t __regXPSR __ASM("xpsr");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 return(__regXPSR);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 /** \brief Get Process Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 This function returns the current value of the Process Stack Pointer (PSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 \return PSP Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 static __INLINE uint32_t __get_PSP(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 register uint32_t __regProcessStackPointer __ASM("psp");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 return(__regProcessStackPointer);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 /** \brief Set Process Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 This function assigns the given value to the Process Stack Pointer (PSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 \param [in] topOfProcStack Process Stack Pointer value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 static __INLINE void __set_PSP(uint32_t topOfProcStack)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 register uint32_t __regProcessStackPointer __ASM("psp");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 __regProcessStackPointer = topOfProcStack;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 /** \brief Get Main Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 This function returns the current value of the Main Stack Pointer (MSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 \return MSP Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 static __INLINE uint32_t __get_MSP(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 register uint32_t __regMainStackPointer __ASM("msp");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 return(__regMainStackPointer);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 /** \brief Set Main Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 This function assigns the given value to the Main Stack Pointer (MSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 \param [in] topOfMainStack Main Stack Pointer value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 static __INLINE void __set_MSP(uint32_t topOfMainStack)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 register uint32_t __regMainStackPointer __ASM("msp");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 __regMainStackPointer = topOfMainStack;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 /** \brief Get Priority Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 This function returns the current state of the priority mask bit from the Priority Mask Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 \return Priority Mask value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 static __INLINE uint32_t __get_PRIMASK(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 register uint32_t __regPriMask __ASM("primask");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 return(__regPriMask);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 /** \brief Set Priority Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 This function assigns the given value to the Priority Mask Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 \param [in] priMask Priority Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 static __INLINE void __set_PRIMASK(uint32_t priMask)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 register uint32_t __regPriMask __ASM("primask");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 __regPriMask = (priMask);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 #if (__CORTEX_M >= 0x03)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 /** \brief Enable FIQ
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 This function enables FIQ interrupts by clearing the F-bit in the CPSR.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 Can only be executed in Privileged modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 #define __enable_fault_irq __enable_fiq
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 /** \brief Disable FIQ
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 This function disables FIQ interrupts by setting the F-bit in the CPSR.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 Can only be executed in Privileged modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 #define __disable_fault_irq __disable_fiq
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 /** \brief Get Base Priority
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 This function returns the current value of the Base Priority register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 \return Base Priority register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 static __INLINE uint32_t __get_BASEPRI(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 register uint32_t __regBasePri __ASM("basepri");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 return(__regBasePri);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 /** \brief Set Base Priority
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 This function assigns the given value to the Base Priority register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 \param [in] basePri Base Priority value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 static __INLINE void __set_BASEPRI(uint32_t basePri)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 register uint32_t __regBasePri __ASM("basepri");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 __regBasePri = (basePri & 0xff);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 /** \brief Get Fault Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 This function returns the current value of the Fault Mask register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 \return Fault Mask register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 static __INLINE uint32_t __get_FAULTMASK(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 register uint32_t __regFaultMask __ASM("faultmask");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 return(__regFaultMask);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 /** \brief Set Fault Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 This function assigns the given value to the Fault Mask register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 \param [in] faultMask Fault Mask value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 static __INLINE void __set_FAULTMASK(uint32_t faultMask)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 register uint32_t __regFaultMask __ASM("faultmask");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 __regFaultMask = (faultMask & (uint32_t)1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 #endif /* (__CORTEX_M >= 0x03) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 #if (__CORTEX_M == 0x04)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 /** \brief Get FPSCR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 This function returns the current value of the Floating Point Status/Control register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 \return Floating Point Status/Control register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 static __INLINE uint32_t __get_FPSCR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 register uint32_t __regfpscr __ASM("fpscr");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 return(__regfpscr);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 #else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 return(0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 /** \brief Set FPSCR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 This function assigns the given value to the Floating Point Status/Control register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 \param [in] fpscr Floating Point Status/Control value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 static __INLINE void __set_FPSCR(uint32_t fpscr)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 register uint32_t __regfpscr __ASM("fpscr");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 __regfpscr = (fpscr);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 #endif /* (__CORTEX_M == 0x04) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 #elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 /* IAR iccarm specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 #include <cmsis_iar.h>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 #elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 /* GNU gcc specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 /** \brief Enable IRQ Interrupts
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 This function enables IRQ interrupts by clearing the I-bit in the CPSR.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 Can only be executed in Privileged modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 __ASM volatile ("cpsie i");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 /** \brief Disable IRQ Interrupts
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 This function disables IRQ interrupts by setting the I-bit in the CPSR.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 Can only be executed in Privileged modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 __attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 __ASM volatile ("cpsid i");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 /** \brief Get Control Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 This function returns the content of the Control Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 \return Control Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 __ASM volatile ("MRS %0, control" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 /** \brief Set Control Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 This function writes the given value to the Control Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 \param [in] control Control Register value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 __attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 __ASM volatile ("MSR control, %0" : : "r" (control) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 /** \brief Get ISPR Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 This function returns the content of the ISPR Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 \return ISPR Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_IPSR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 /** \brief Get APSR Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 This function returns the content of the APSR Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 \return APSR Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_APSR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 __ASM volatile ("MRS %0, apsr" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 /** \brief Get xPSR Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 This function returns the content of the xPSR Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 \return xPSR Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_xPSR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 __ASM volatile ("MRS %0, xpsr" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 /** \brief Get Process Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 This function returns the current value of the Process Stack Pointer (PSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 \return PSP Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 register uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 __ASM volatile ("MRS %0, psp\n" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 /** \brief Set Process Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 This function assigns the given value to the Process Stack Pointer (PSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 \param [in] topOfProcStack Process Stack Pointer value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 __attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 __ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 /** \brief Get Main Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 This function returns the current value of the Main Stack Pointer (MSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 \return MSP Register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 register uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 __ASM volatile ("MRS %0, msp\n" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 /** \brief Set Main Stack Pointer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 This function assigns the given value to the Main Stack Pointer (MSP).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 \param [in] topOfMainStack Main Stack Pointer value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 __attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451 /** \brief Get Priority Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 This function returns the current state of the priority mask bit from the Priority Mask Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 \return Priority Mask value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 __ASM volatile ("MRS %0, primask" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 /** \brief Set Priority Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 This function assigns the given value to the Priority Mask Register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 \param [in] priMask Priority Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472 __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 __ASM volatile ("MSR primask, %0" : : "r" (priMask) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 #if (__CORTEX_M >= 0x03)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 /** \brief Enable FIQ
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 This function enables FIQ interrupts by clearing the F-bit in the CPSR.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 Can only be executed in Privileged modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 __ASM volatile ("cpsie f");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 /** \brief Disable FIQ
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 This function disables FIQ interrupts by setting the F-bit in the CPSR.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 Can only be executed in Privileged modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 __attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 __ASM volatile ("cpsid f");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 /** \brief Get Base Priority
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 This function returns the current value of the Base Priority register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 \return Base Priority register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 __ASM volatile ("MRS %0, basepri_max" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 /** \brief Set Base Priority
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 This function assigns the given value to the Base Priority register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 \param [in] basePri Base Priority value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 __attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525 __ASM volatile ("MSR basepri, %0" : : "r" (value) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 /** \brief Get Fault Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 This function returns the current value of the Fault Mask register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 \return Fault Mask register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 /** \brief Set Fault Mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 This function assigns the given value to the Fault Mask register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 \param [in] faultMask Fault Mask value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 __attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555 #endif /* (__CORTEX_M >= 0x03) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 #if (__CORTEX_M == 0x04)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560 /** \brief Get FPSCR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 This function returns the current value of the Floating Point Status/Control register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 \return Floating Point Status/Control register value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 __ASM volatile ("VMRS %0, fpscr" : "=r" (result) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573 #else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574 return(0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 /** \brief Set FPSCR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 This function assigns the given value to the Floating Point Status/Control register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583 \param [in] fpscr Floating Point Status/Control value to set
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 __attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 #endif /* (__CORTEX_M == 0x04) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 #elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 /* TASKING carm specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 /*
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 * The CMSIS functions have been implemented as intrinsics in the compiler.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600 * Please use "carm -?i" to get an up to date list of all instrinsics,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 * Including the CMSIS ones.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 /*@} end of CMSIS_Core_RegAccFunctions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 #endif /* __CORE_CMFUNC_H */