The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Fri May 26 12:30:20 2017 +0100
Revision:
143:86740a56073b
Parent:
110:165afa46840b
Release 143 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 86:04dd9b1680ae 1 /**************************************************************************//**
bogdanm 86:04dd9b1680ae 2 * @file core_cmFunc.h
bogdanm 86:04dd9b1680ae 3 * @brief CMSIS Cortex-M Core Function Access Header File
Kojto 110:165afa46840b 4 * @version V4.10
Kojto 110:165afa46840b 5 * @date 18. March 2015
bogdanm 86:04dd9b1680ae 6 *
bogdanm 86:04dd9b1680ae 7 * @note
bogdanm 86:04dd9b1680ae 8 *
bogdanm 86:04dd9b1680ae 9 ******************************************************************************/
Kojto 110:165afa46840b 10 /* Copyright (c) 2009 - 2015 ARM LIMITED
bogdanm 86:04dd9b1680ae 11
bogdanm 86:04dd9b1680ae 12 All rights reserved.
bogdanm 86:04dd9b1680ae 13 Redistribution and use in source and binary forms, with or without
bogdanm 86:04dd9b1680ae 14 modification, are permitted provided that the following conditions are met:
bogdanm 86:04dd9b1680ae 15 - Redistributions of source code must retain the above copyright
bogdanm 86:04dd9b1680ae 16 notice, this list of conditions and the following disclaimer.
bogdanm 86:04dd9b1680ae 17 - Redistributions in binary form must reproduce the above copyright
bogdanm 86:04dd9b1680ae 18 notice, this list of conditions and the following disclaimer in the
bogdanm 86:04dd9b1680ae 19 documentation and/or other materials provided with the distribution.
bogdanm 86:04dd9b1680ae 20 - Neither the name of ARM nor the names of its contributors may be used
bogdanm 86:04dd9b1680ae 21 to endorse or promote products derived from this software without
bogdanm 86:04dd9b1680ae 22 specific prior written permission.
bogdanm 86:04dd9b1680ae 23 *
bogdanm 86:04dd9b1680ae 24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 86:04dd9b1680ae 25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 86:04dd9b1680ae 26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
bogdanm 86:04dd9b1680ae 27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
bogdanm 86:04dd9b1680ae 28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
bogdanm 86:04dd9b1680ae 29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
bogdanm 86:04dd9b1680ae 30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
bogdanm 86:04dd9b1680ae 31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
bogdanm 86:04dd9b1680ae 32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
bogdanm 86:04dd9b1680ae 33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
bogdanm 86:04dd9b1680ae 34 POSSIBILITY OF SUCH DAMAGE.
bogdanm 86:04dd9b1680ae 35 ---------------------------------------------------------------------------*/
bogdanm 86:04dd9b1680ae 36
bogdanm 86:04dd9b1680ae 37
bogdanm 86:04dd9b1680ae 38 #ifndef __CORE_CMFUNC_H
bogdanm 86:04dd9b1680ae 39 #define __CORE_CMFUNC_H
bogdanm 86:04dd9b1680ae 40
bogdanm 86:04dd9b1680ae 41
bogdanm 86:04dd9b1680ae 42 /* ########################### Core Function Access ########################### */
bogdanm 86:04dd9b1680ae 43 /** \ingroup CMSIS_Core_FunctionInterface
bogdanm 86:04dd9b1680ae 44 \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
bogdanm 86:04dd9b1680ae 45 @{
bogdanm 86:04dd9b1680ae 46 */
bogdanm 86:04dd9b1680ae 47
bogdanm 86:04dd9b1680ae 48 #if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
bogdanm 86:04dd9b1680ae 49 /* ARM armcc specific functions */
bogdanm 86:04dd9b1680ae 50
bogdanm 86:04dd9b1680ae 51 #if (__ARMCC_VERSION < 400677)
bogdanm 86:04dd9b1680ae 52 #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
bogdanm 86:04dd9b1680ae 53 #endif
bogdanm 86:04dd9b1680ae 54
bogdanm 86:04dd9b1680ae 55 /* intrinsic void __enable_irq(); */
bogdanm 86:04dd9b1680ae 56 /* intrinsic void __disable_irq(); */
bogdanm 86:04dd9b1680ae 57
bogdanm 86:04dd9b1680ae 58 /** \brief Get Control Register
bogdanm 86:04dd9b1680ae 59
bogdanm 86:04dd9b1680ae 60 This function returns the content of the Control Register.
bogdanm 86:04dd9b1680ae 61
bogdanm 86:04dd9b1680ae 62 \return Control Register value
bogdanm 86:04dd9b1680ae 63 */
bogdanm 86:04dd9b1680ae 64 __STATIC_INLINE uint32_t __get_CONTROL(void)
bogdanm 86:04dd9b1680ae 65 {
bogdanm 86:04dd9b1680ae 66 register uint32_t __regControl __ASM("control");
bogdanm 86:04dd9b1680ae 67 return(__regControl);
bogdanm 86:04dd9b1680ae 68 }
bogdanm 86:04dd9b1680ae 69
bogdanm 86:04dd9b1680ae 70
bogdanm 86:04dd9b1680ae 71 /** \brief Set Control Register
bogdanm 86:04dd9b1680ae 72
bogdanm 86:04dd9b1680ae 73 This function writes the given value to the Control Register.
bogdanm 86:04dd9b1680ae 74
bogdanm 86:04dd9b1680ae 75 \param [in] control Control Register value to set
bogdanm 86:04dd9b1680ae 76 */
bogdanm 86:04dd9b1680ae 77 __STATIC_INLINE void __set_CONTROL(uint32_t control)
bogdanm 86:04dd9b1680ae 78 {
bogdanm 86:04dd9b1680ae 79 register uint32_t __regControl __ASM("control");
bogdanm 86:04dd9b1680ae 80 __regControl = control;
bogdanm 86:04dd9b1680ae 81 }
bogdanm 86:04dd9b1680ae 82
bogdanm 86:04dd9b1680ae 83
bogdanm 86:04dd9b1680ae 84 /** \brief Get IPSR Register
bogdanm 86:04dd9b1680ae 85
bogdanm 86:04dd9b1680ae 86 This function returns the content of the IPSR Register.
bogdanm 86:04dd9b1680ae 87
bogdanm 86:04dd9b1680ae 88 \return IPSR Register value
bogdanm 86:04dd9b1680ae 89 */
bogdanm 86:04dd9b1680ae 90 __STATIC_INLINE uint32_t __get_IPSR(void)
bogdanm 86:04dd9b1680ae 91 {
bogdanm 86:04dd9b1680ae 92 register uint32_t __regIPSR __ASM("ipsr");
bogdanm 86:04dd9b1680ae 93 return(__regIPSR);
bogdanm 86:04dd9b1680ae 94 }
bogdanm 86:04dd9b1680ae 95
bogdanm 86:04dd9b1680ae 96
bogdanm 86:04dd9b1680ae 97 /** \brief Get APSR Register
bogdanm 86:04dd9b1680ae 98
bogdanm 86:04dd9b1680ae 99 This function returns the content of the APSR Register.
bogdanm 86:04dd9b1680ae 100
bogdanm 86:04dd9b1680ae 101 \return APSR Register value
bogdanm 86:04dd9b1680ae 102 */
bogdanm 86:04dd9b1680ae 103 __STATIC_INLINE uint32_t __get_APSR(void)
bogdanm 86:04dd9b1680ae 104 {
bogdanm 86:04dd9b1680ae 105 register uint32_t __regAPSR __ASM("apsr");
bogdanm 86:04dd9b1680ae 106 return(__regAPSR);
bogdanm 86:04dd9b1680ae 107 }
bogdanm 86:04dd9b1680ae 108
bogdanm 86:04dd9b1680ae 109
bogdanm 86:04dd9b1680ae 110 /** \brief Get xPSR Register
bogdanm 86:04dd9b1680ae 111
bogdanm 86:04dd9b1680ae 112 This function returns the content of the xPSR Register.
bogdanm 86:04dd9b1680ae 113
bogdanm 86:04dd9b1680ae 114 \return xPSR Register value
bogdanm 86:04dd9b1680ae 115 */
bogdanm 86:04dd9b1680ae 116 __STATIC_INLINE uint32_t __get_xPSR(void)
bogdanm 86:04dd9b1680ae 117 {
bogdanm 86:04dd9b1680ae 118 register uint32_t __regXPSR __ASM("xpsr");
bogdanm 86:04dd9b1680ae 119 return(__regXPSR);
bogdanm 86:04dd9b1680ae 120 }
bogdanm 86:04dd9b1680ae 121
bogdanm 86:04dd9b1680ae 122
bogdanm 86:04dd9b1680ae 123 /** \brief Get Process Stack Pointer
bogdanm 86:04dd9b1680ae 124
bogdanm 86:04dd9b1680ae 125 This function returns the current value of the Process Stack Pointer (PSP).
bogdanm 86:04dd9b1680ae 126
bogdanm 86:04dd9b1680ae 127 \return PSP Register value
bogdanm 86:04dd9b1680ae 128 */
bogdanm 86:04dd9b1680ae 129 __STATIC_INLINE uint32_t __get_PSP(void)
bogdanm 86:04dd9b1680ae 130 {
bogdanm 86:04dd9b1680ae 131 register uint32_t __regProcessStackPointer __ASM("psp");
bogdanm 86:04dd9b1680ae 132 return(__regProcessStackPointer);
bogdanm 86:04dd9b1680ae 133 }
bogdanm 86:04dd9b1680ae 134
bogdanm 86:04dd9b1680ae 135
bogdanm 86:04dd9b1680ae 136 /** \brief Set Process Stack Pointer
bogdanm 86:04dd9b1680ae 137
bogdanm 86:04dd9b1680ae 138 This function assigns the given value to the Process Stack Pointer (PSP).
bogdanm 86:04dd9b1680ae 139
bogdanm 86:04dd9b1680ae 140 \param [in] topOfProcStack Process Stack Pointer value to set
bogdanm 86:04dd9b1680ae 141 */
bogdanm 86:04dd9b1680ae 142 __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
bogdanm 86:04dd9b1680ae 143 {
bogdanm 86:04dd9b1680ae 144 register uint32_t __regProcessStackPointer __ASM("psp");
bogdanm 86:04dd9b1680ae 145 __regProcessStackPointer = topOfProcStack;
bogdanm 86:04dd9b1680ae 146 }
bogdanm 86:04dd9b1680ae 147
bogdanm 86:04dd9b1680ae 148
bogdanm 86:04dd9b1680ae 149 /** \brief Get Main Stack Pointer
bogdanm 86:04dd9b1680ae 150
bogdanm 86:04dd9b1680ae 151 This function returns the current value of the Main Stack Pointer (MSP).
bogdanm 86:04dd9b1680ae 152
bogdanm 86:04dd9b1680ae 153 \return MSP Register value
bogdanm 86:04dd9b1680ae 154 */
bogdanm 86:04dd9b1680ae 155 __STATIC_INLINE uint32_t __get_MSP(void)
bogdanm 86:04dd9b1680ae 156 {
bogdanm 86:04dd9b1680ae 157 register uint32_t __regMainStackPointer __ASM("msp");
bogdanm 86:04dd9b1680ae 158 return(__regMainStackPointer);
bogdanm 86:04dd9b1680ae 159 }
bogdanm 86:04dd9b1680ae 160
bogdanm 86:04dd9b1680ae 161
bogdanm 86:04dd9b1680ae 162 /** \brief Set Main Stack Pointer
bogdanm 86:04dd9b1680ae 163
bogdanm 86:04dd9b1680ae 164 This function assigns the given value to the Main Stack Pointer (MSP).
bogdanm 86:04dd9b1680ae 165
bogdanm 86:04dd9b1680ae 166 \param [in] topOfMainStack Main Stack Pointer value to set
bogdanm 86:04dd9b1680ae 167 */
bogdanm 86:04dd9b1680ae 168 __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
bogdanm 86:04dd9b1680ae 169 {
bogdanm 86:04dd9b1680ae 170 register uint32_t __regMainStackPointer __ASM("msp");
bogdanm 86:04dd9b1680ae 171 __regMainStackPointer = topOfMainStack;
bogdanm 86:04dd9b1680ae 172 }
bogdanm 86:04dd9b1680ae 173
bogdanm 86:04dd9b1680ae 174
bogdanm 86:04dd9b1680ae 175 /** \brief Get Priority Mask
bogdanm 86:04dd9b1680ae 176
bogdanm 86:04dd9b1680ae 177 This function returns the current state of the priority mask bit from the Priority Mask Register.
bogdanm 86:04dd9b1680ae 178
bogdanm 86:04dd9b1680ae 179 \return Priority Mask value
bogdanm 86:04dd9b1680ae 180 */
bogdanm 86:04dd9b1680ae 181 __STATIC_INLINE uint32_t __get_PRIMASK(void)
bogdanm 86:04dd9b1680ae 182 {
bogdanm 86:04dd9b1680ae 183 register uint32_t __regPriMask __ASM("primask");
bogdanm 86:04dd9b1680ae 184 return(__regPriMask);
bogdanm 86:04dd9b1680ae 185 }
bogdanm 86:04dd9b1680ae 186
bogdanm 86:04dd9b1680ae 187
bogdanm 86:04dd9b1680ae 188 /** \brief Set Priority Mask
bogdanm 86:04dd9b1680ae 189
bogdanm 86:04dd9b1680ae 190 This function assigns the given value to the Priority Mask Register.
bogdanm 86:04dd9b1680ae 191
bogdanm 86:04dd9b1680ae 192 \param [in] priMask Priority Mask
bogdanm 86:04dd9b1680ae 193 */
bogdanm 86:04dd9b1680ae 194 __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
bogdanm 86:04dd9b1680ae 195 {
bogdanm 86:04dd9b1680ae 196 register uint32_t __regPriMask __ASM("primask");
bogdanm 86:04dd9b1680ae 197 __regPriMask = (priMask);
bogdanm 86:04dd9b1680ae 198 }
bogdanm 86:04dd9b1680ae 199
bogdanm 86:04dd9b1680ae 200
Kojto 110:165afa46840b 201 #if (__CORTEX_M >= 0x03) || (__CORTEX_SC >= 300)
bogdanm 86:04dd9b1680ae 202
bogdanm 86:04dd9b1680ae 203 /** \brief Enable FIQ
bogdanm 86:04dd9b1680ae 204
bogdanm 86:04dd9b1680ae 205 This function enables FIQ interrupts by clearing the F-bit in the CPSR.
bogdanm 86:04dd9b1680ae 206 Can only be executed in Privileged modes.
bogdanm 86:04dd9b1680ae 207 */
bogdanm 86:04dd9b1680ae 208 #define __enable_fault_irq __enable_fiq
bogdanm 86:04dd9b1680ae 209
bogdanm 86:04dd9b1680ae 210
bogdanm 86:04dd9b1680ae 211 /** \brief Disable FIQ
bogdanm 86:04dd9b1680ae 212
bogdanm 86:04dd9b1680ae 213 This function disables FIQ interrupts by setting the F-bit in the CPSR.
bogdanm 86:04dd9b1680ae 214 Can only be executed in Privileged modes.
bogdanm 86:04dd9b1680ae 215 */
bogdanm 86:04dd9b1680ae 216 #define __disable_fault_irq __disable_fiq
bogdanm 86:04dd9b1680ae 217
bogdanm 86:04dd9b1680ae 218
bogdanm 86:04dd9b1680ae 219 /** \brief Get Base Priority
bogdanm 86:04dd9b1680ae 220
bogdanm 86:04dd9b1680ae 221 This function returns the current value of the Base Priority register.
bogdanm 86:04dd9b1680ae 222
bogdanm 86:04dd9b1680ae 223 \return Base Priority register value
bogdanm 86:04dd9b1680ae 224 */
bogdanm 86:04dd9b1680ae 225 __STATIC_INLINE uint32_t __get_BASEPRI(void)
bogdanm 86:04dd9b1680ae 226 {
bogdanm 86:04dd9b1680ae 227 register uint32_t __regBasePri __ASM("basepri");
bogdanm 86:04dd9b1680ae 228 return(__regBasePri);
bogdanm 86:04dd9b1680ae 229 }
bogdanm 86:04dd9b1680ae 230
bogdanm 86:04dd9b1680ae 231
bogdanm 86:04dd9b1680ae 232 /** \brief Set Base Priority
bogdanm 86:04dd9b1680ae 233
bogdanm 86:04dd9b1680ae 234 This function assigns the given value to the Base Priority register.
bogdanm 86:04dd9b1680ae 235
bogdanm 86:04dd9b1680ae 236 \param [in] basePri Base Priority value to set
bogdanm 86:04dd9b1680ae 237 */
bogdanm 86:04dd9b1680ae 238 __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
bogdanm 86:04dd9b1680ae 239 {
bogdanm 86:04dd9b1680ae 240 register uint32_t __regBasePri __ASM("basepri");
bogdanm 86:04dd9b1680ae 241 __regBasePri = (basePri & 0xff);
bogdanm 86:04dd9b1680ae 242 }
bogdanm 86:04dd9b1680ae 243
bogdanm 86:04dd9b1680ae 244
Kojto 110:165afa46840b 245 /** \brief Set Base Priority with condition
Kojto 110:165afa46840b 246
Kojto 110:165afa46840b 247 This function assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
Kojto 110:165afa46840b 248 or the new value increases the BASEPRI priority level.
Kojto 110:165afa46840b 249
Kojto 110:165afa46840b 250 \param [in] basePri Base Priority value to set
Kojto 110:165afa46840b 251 */
Kojto 110:165afa46840b 252 __STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
Kojto 110:165afa46840b 253 {
Kojto 110:165afa46840b 254 register uint32_t __regBasePriMax __ASM("basepri_max");
Kojto 110:165afa46840b 255 __regBasePriMax = (basePri & 0xff);
Kojto 110:165afa46840b 256 }
Kojto 110:165afa46840b 257
Kojto 110:165afa46840b 258
bogdanm 86:04dd9b1680ae 259 /** \brief Get Fault Mask
bogdanm 86:04dd9b1680ae 260
bogdanm 86:04dd9b1680ae 261 This function returns the current value of the Fault Mask register.
bogdanm 86:04dd9b1680ae 262
bogdanm 86:04dd9b1680ae 263 \return Fault Mask register value
bogdanm 86:04dd9b1680ae 264 */
bogdanm 86:04dd9b1680ae 265 __STATIC_INLINE uint32_t __get_FAULTMASK(void)
bogdanm 86:04dd9b1680ae 266 {
bogdanm 86:04dd9b1680ae 267 register uint32_t __regFaultMask __ASM("faultmask");
bogdanm 86:04dd9b1680ae 268 return(__regFaultMask);
bogdanm 86:04dd9b1680ae 269 }
bogdanm 86:04dd9b1680ae 270
bogdanm 86:04dd9b1680ae 271
bogdanm 86:04dd9b1680ae 272 /** \brief Set Fault Mask
bogdanm 86:04dd9b1680ae 273
bogdanm 86:04dd9b1680ae 274 This function assigns the given value to the Fault Mask register.
bogdanm 86:04dd9b1680ae 275
bogdanm 86:04dd9b1680ae 276 \param [in] faultMask Fault Mask value to set
bogdanm 86:04dd9b1680ae 277 */
bogdanm 86:04dd9b1680ae 278 __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
bogdanm 86:04dd9b1680ae 279 {
bogdanm 86:04dd9b1680ae 280 register uint32_t __regFaultMask __ASM("faultmask");
bogdanm 86:04dd9b1680ae 281 __regFaultMask = (faultMask & (uint32_t)1);
bogdanm 86:04dd9b1680ae 282 }
bogdanm 86:04dd9b1680ae 283
Kojto 110:165afa46840b 284 #endif /* (__CORTEX_M >= 0x03) || (__CORTEX_SC >= 300) */
bogdanm 86:04dd9b1680ae 285
bogdanm 86:04dd9b1680ae 286
Kojto 110:165afa46840b 287 #if (__CORTEX_M == 0x04) || (__CORTEX_M == 0x07)
bogdanm 86:04dd9b1680ae 288
bogdanm 86:04dd9b1680ae 289 /** \brief Get FPSCR
bogdanm 86:04dd9b1680ae 290
bogdanm 86:04dd9b1680ae 291 This function returns the current value of the Floating Point Status/Control register.
bogdanm 86:04dd9b1680ae 292
bogdanm 86:04dd9b1680ae 293 \return Floating Point Status/Control register value
bogdanm 86:04dd9b1680ae 294 */
bogdanm 86:04dd9b1680ae 295 __STATIC_INLINE uint32_t __get_FPSCR(void)
bogdanm 86:04dd9b1680ae 296 {
bogdanm 86:04dd9b1680ae 297 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
bogdanm 86:04dd9b1680ae 298 register uint32_t __regfpscr __ASM("fpscr");
bogdanm 86:04dd9b1680ae 299 return(__regfpscr);
bogdanm 86:04dd9b1680ae 300 #else
bogdanm 86:04dd9b1680ae 301 return(0);
bogdanm 86:04dd9b1680ae 302 #endif
bogdanm 86:04dd9b1680ae 303 }
bogdanm 86:04dd9b1680ae 304
bogdanm 86:04dd9b1680ae 305
bogdanm 86:04dd9b1680ae 306 /** \brief Set FPSCR
bogdanm 86:04dd9b1680ae 307
bogdanm 86:04dd9b1680ae 308 This function assigns the given value to the Floating Point Status/Control register.
bogdanm 86:04dd9b1680ae 309
bogdanm 86:04dd9b1680ae 310 \param [in] fpscr Floating Point Status/Control value to set
bogdanm 86:04dd9b1680ae 311 */
bogdanm 86:04dd9b1680ae 312 __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
bogdanm 86:04dd9b1680ae 313 {
bogdanm 86:04dd9b1680ae 314 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
bogdanm 86:04dd9b1680ae 315 register uint32_t __regfpscr __ASM("fpscr");
bogdanm 86:04dd9b1680ae 316 __regfpscr = (fpscr);
bogdanm 86:04dd9b1680ae 317 #endif
bogdanm 86:04dd9b1680ae 318 }
bogdanm 86:04dd9b1680ae 319
Kojto 110:165afa46840b 320 #endif /* (__CORTEX_M == 0x04) || (__CORTEX_M == 0x07) */
bogdanm 86:04dd9b1680ae 321
bogdanm 86:04dd9b1680ae 322
bogdanm 86:04dd9b1680ae 323 #elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
bogdanm 86:04dd9b1680ae 324 /* GNU gcc specific functions */
bogdanm 86:04dd9b1680ae 325
bogdanm 86:04dd9b1680ae 326 /** \brief Enable IRQ Interrupts
bogdanm 86:04dd9b1680ae 327
bogdanm 86:04dd9b1680ae 328 This function enables IRQ interrupts by clearing the I-bit in the CPSR.
bogdanm 86:04dd9b1680ae 329 Can only be executed in Privileged modes.
bogdanm 86:04dd9b1680ae 330 */
bogdanm 86:04dd9b1680ae 331 __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)
bogdanm 86:04dd9b1680ae 332 {
bogdanm 86:04dd9b1680ae 333 __ASM volatile ("cpsie i" : : : "memory");
bogdanm 86:04dd9b1680ae 334 }
bogdanm 86:04dd9b1680ae 335
bogdanm 86:04dd9b1680ae 336
bogdanm 86:04dd9b1680ae 337 /** \brief Disable IRQ Interrupts
bogdanm 86:04dd9b1680ae 338
bogdanm 86:04dd9b1680ae 339 This function disables IRQ interrupts by setting the I-bit in the CPSR.
bogdanm 86:04dd9b1680ae 340 Can only be executed in Privileged modes.
bogdanm 86:04dd9b1680ae 341 */
bogdanm 86:04dd9b1680ae 342 __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)
bogdanm 86:04dd9b1680ae 343 {
bogdanm 86:04dd9b1680ae 344 __ASM volatile ("cpsid i" : : : "memory");
bogdanm 86:04dd9b1680ae 345 }
bogdanm 86:04dd9b1680ae 346
bogdanm 86:04dd9b1680ae 347
bogdanm 86:04dd9b1680ae 348 /** \brief Get Control Register
bogdanm 86:04dd9b1680ae 349
bogdanm 86:04dd9b1680ae 350 This function returns the content of the Control Register.
bogdanm 86:04dd9b1680ae 351
bogdanm 86:04dd9b1680ae 352 \return Control Register value
bogdanm 86:04dd9b1680ae 353 */
bogdanm 86:04dd9b1680ae 354 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
bogdanm 86:04dd9b1680ae 355 {
bogdanm 86:04dd9b1680ae 356 uint32_t result;
bogdanm 86:04dd9b1680ae 357
bogdanm 86:04dd9b1680ae 358 __ASM volatile ("MRS %0, control" : "=r" (result) );
bogdanm 86:04dd9b1680ae 359 return(result);
bogdanm 86:04dd9b1680ae 360 }
bogdanm 86:04dd9b1680ae 361
bogdanm 86:04dd9b1680ae 362
bogdanm 86:04dd9b1680ae 363 /** \brief Set Control Register
bogdanm 86:04dd9b1680ae 364
bogdanm 86:04dd9b1680ae 365 This function writes the given value to the Control Register.
bogdanm 86:04dd9b1680ae 366
bogdanm 86:04dd9b1680ae 367 \param [in] control Control Register value to set
bogdanm 86:04dd9b1680ae 368 */
bogdanm 86:04dd9b1680ae 369 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CONTROL(uint32_t control)
bogdanm 86:04dd9b1680ae 370 {
bogdanm 86:04dd9b1680ae 371 __ASM volatile ("MSR control, %0" : : "r" (control) : "memory");
bogdanm 86:04dd9b1680ae 372 }
bogdanm 86:04dd9b1680ae 373
bogdanm 86:04dd9b1680ae 374
bogdanm 86:04dd9b1680ae 375 /** \brief Get IPSR Register
bogdanm 86:04dd9b1680ae 376
bogdanm 86:04dd9b1680ae 377 This function returns the content of the IPSR Register.
bogdanm 86:04dd9b1680ae 378
bogdanm 86:04dd9b1680ae 379 \return IPSR Register value
bogdanm 86:04dd9b1680ae 380 */
bogdanm 86:04dd9b1680ae 381 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(void)
bogdanm 86:04dd9b1680ae 382 {
bogdanm 86:04dd9b1680ae 383 uint32_t result;
bogdanm 86:04dd9b1680ae 384
bogdanm 86:04dd9b1680ae 385 __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
bogdanm 86:04dd9b1680ae 386 return(result);
bogdanm 86:04dd9b1680ae 387 }
bogdanm 86:04dd9b1680ae 388
bogdanm 86:04dd9b1680ae 389
bogdanm 86:04dd9b1680ae 390 /** \brief Get APSR Register
bogdanm 86:04dd9b1680ae 391
bogdanm 86:04dd9b1680ae 392 This function returns the content of the APSR Register.
bogdanm 86:04dd9b1680ae 393
bogdanm 86:04dd9b1680ae 394 \return APSR Register value
bogdanm 86:04dd9b1680ae 395 */
bogdanm 86:04dd9b1680ae 396 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
bogdanm 86:04dd9b1680ae 397 {
bogdanm 86:04dd9b1680ae 398 uint32_t result;
bogdanm 86:04dd9b1680ae 399
bogdanm 86:04dd9b1680ae 400 __ASM volatile ("MRS %0, apsr" : "=r" (result) );
bogdanm 86:04dd9b1680ae 401 return(result);
bogdanm 86:04dd9b1680ae 402 }
bogdanm 86:04dd9b1680ae 403
bogdanm 86:04dd9b1680ae 404
bogdanm 86:04dd9b1680ae 405 /** \brief Get xPSR Register
bogdanm 86:04dd9b1680ae 406
bogdanm 86:04dd9b1680ae 407 This function returns the content of the xPSR Register.
bogdanm 86:04dd9b1680ae 408
bogdanm 86:04dd9b1680ae 409 \return xPSR Register value
bogdanm 86:04dd9b1680ae 410 */
bogdanm 86:04dd9b1680ae 411 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
bogdanm 86:04dd9b1680ae 412 {
bogdanm 86:04dd9b1680ae 413 uint32_t result;
bogdanm 86:04dd9b1680ae 414
bogdanm 86:04dd9b1680ae 415 __ASM volatile ("MRS %0, xpsr" : "=r" (result) );
bogdanm 86:04dd9b1680ae 416 return(result);
bogdanm 86:04dd9b1680ae 417 }
bogdanm 86:04dd9b1680ae 418
bogdanm 86:04dd9b1680ae 419
bogdanm 86:04dd9b1680ae 420 /** \brief Get Process Stack Pointer
bogdanm 86:04dd9b1680ae 421
bogdanm 86:04dd9b1680ae 422 This function returns the current value of the Process Stack Pointer (PSP).
bogdanm 86:04dd9b1680ae 423
bogdanm 86:04dd9b1680ae 424 \return PSP Register value
bogdanm 86:04dd9b1680ae 425 */
bogdanm 86:04dd9b1680ae 426 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
bogdanm 86:04dd9b1680ae 427 {
bogdanm 86:04dd9b1680ae 428 register uint32_t result;
bogdanm 86:04dd9b1680ae 429
bogdanm 86:04dd9b1680ae 430 __ASM volatile ("MRS %0, psp\n" : "=r" (result) );
bogdanm 86:04dd9b1680ae 431 return(result);
bogdanm 86:04dd9b1680ae 432 }
bogdanm 86:04dd9b1680ae 433
bogdanm 86:04dd9b1680ae 434
bogdanm 86:04dd9b1680ae 435 /** \brief Set Process Stack Pointer
bogdanm 86:04dd9b1680ae 436
bogdanm 86:04dd9b1680ae 437 This function assigns the given value to the Process Stack Pointer (PSP).
bogdanm 86:04dd9b1680ae 438
bogdanm 86:04dd9b1680ae 439 \param [in] topOfProcStack Process Stack Pointer value to set
bogdanm 86:04dd9b1680ae 440 */
bogdanm 86:04dd9b1680ae 441 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
bogdanm 86:04dd9b1680ae 442 {
bogdanm 86:04dd9b1680ae 443 __ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : "sp");
bogdanm 86:04dd9b1680ae 444 }
bogdanm 86:04dd9b1680ae 445
bogdanm 86:04dd9b1680ae 446
bogdanm 86:04dd9b1680ae 447 /** \brief Get Main Stack Pointer
bogdanm 86:04dd9b1680ae 448
bogdanm 86:04dd9b1680ae 449 This function returns the current value of the Main Stack Pointer (MSP).
bogdanm 86:04dd9b1680ae 450
bogdanm 86:04dd9b1680ae 451 \return MSP Register value
bogdanm 86:04dd9b1680ae 452 */
bogdanm 86:04dd9b1680ae 453 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
bogdanm 86:04dd9b1680ae 454 {
bogdanm 86:04dd9b1680ae 455 register uint32_t result;
bogdanm 86:04dd9b1680ae 456
bogdanm 86:04dd9b1680ae 457 __ASM volatile ("MRS %0, msp\n" : "=r" (result) );
bogdanm 86:04dd9b1680ae 458 return(result);
bogdanm 86:04dd9b1680ae 459 }
bogdanm 86:04dd9b1680ae 460
bogdanm 86:04dd9b1680ae 461
bogdanm 86:04dd9b1680ae 462 /** \brief Set Main Stack Pointer
bogdanm 86:04dd9b1680ae 463
bogdanm 86:04dd9b1680ae 464 This function assigns the given value to the Main Stack Pointer (MSP).
bogdanm 86:04dd9b1680ae 465
bogdanm 86:04dd9b1680ae 466 \param [in] topOfMainStack Main Stack Pointer value to set
bogdanm 86:04dd9b1680ae 467 */
bogdanm 86:04dd9b1680ae 468 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
bogdanm 86:04dd9b1680ae 469 {
bogdanm 86:04dd9b1680ae 470 __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp");
bogdanm 86:04dd9b1680ae 471 }
bogdanm 86:04dd9b1680ae 472
bogdanm 86:04dd9b1680ae 473
bogdanm 86:04dd9b1680ae 474 /** \brief Get Priority Mask
bogdanm 86:04dd9b1680ae 475
bogdanm 86:04dd9b1680ae 476 This function returns the current state of the priority mask bit from the Priority Mask Register.
bogdanm 86:04dd9b1680ae 477
bogdanm 86:04dd9b1680ae 478 \return Priority Mask value
bogdanm 86:04dd9b1680ae 479 */
bogdanm 86:04dd9b1680ae 480 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
bogdanm 86:04dd9b1680ae 481 {
bogdanm 86:04dd9b1680ae 482 uint32_t result;
bogdanm 86:04dd9b1680ae 483
bogdanm 86:04dd9b1680ae 484 __ASM volatile ("MRS %0, primask" : "=r" (result) );
bogdanm 86:04dd9b1680ae 485 return(result);
bogdanm 86:04dd9b1680ae 486 }
bogdanm 86:04dd9b1680ae 487
bogdanm 86:04dd9b1680ae 488
bogdanm 86:04dd9b1680ae 489 /** \brief Set Priority Mask
bogdanm 86:04dd9b1680ae 490
bogdanm 86:04dd9b1680ae 491 This function assigns the given value to the Priority Mask Register.
bogdanm 86:04dd9b1680ae 492
bogdanm 86:04dd9b1680ae 493 \param [in] priMask Priority Mask
bogdanm 86:04dd9b1680ae 494 */
bogdanm 86:04dd9b1680ae 495 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
bogdanm 86:04dd9b1680ae 496 {
bogdanm 86:04dd9b1680ae 497 __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
bogdanm 86:04dd9b1680ae 498 }
bogdanm 86:04dd9b1680ae 499
bogdanm 86:04dd9b1680ae 500
bogdanm 86:04dd9b1680ae 501 #if (__CORTEX_M >= 0x03)
bogdanm 86:04dd9b1680ae 502
bogdanm 86:04dd9b1680ae 503 /** \brief Enable FIQ
bogdanm 86:04dd9b1680ae 504
bogdanm 86:04dd9b1680ae 505 This function enables FIQ interrupts by clearing the F-bit in the CPSR.
bogdanm 86:04dd9b1680ae 506 Can only be executed in Privileged modes.
bogdanm 86:04dd9b1680ae 507 */
bogdanm 86:04dd9b1680ae 508 __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_fault_irq(void)
bogdanm 86:04dd9b1680ae 509 {
bogdanm 86:04dd9b1680ae 510 __ASM volatile ("cpsie f" : : : "memory");
bogdanm 86:04dd9b1680ae 511 }
bogdanm 86:04dd9b1680ae 512
bogdanm 86:04dd9b1680ae 513
bogdanm 86:04dd9b1680ae 514 /** \brief Disable FIQ
bogdanm 86:04dd9b1680ae 515
bogdanm 86:04dd9b1680ae 516 This function disables FIQ interrupts by setting the F-bit in the CPSR.
bogdanm 86:04dd9b1680ae 517 Can only be executed in Privileged modes.
bogdanm 86:04dd9b1680ae 518 */
bogdanm 86:04dd9b1680ae 519 __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_fault_irq(void)
bogdanm 86:04dd9b1680ae 520 {
bogdanm 86:04dd9b1680ae 521 __ASM volatile ("cpsid f" : : : "memory");
bogdanm 86:04dd9b1680ae 522 }
bogdanm 86:04dd9b1680ae 523
bogdanm 86:04dd9b1680ae 524
bogdanm 86:04dd9b1680ae 525 /** \brief Get Base Priority
bogdanm 86:04dd9b1680ae 526
bogdanm 86:04dd9b1680ae 527 This function returns the current value of the Base Priority register.
bogdanm 86:04dd9b1680ae 528
bogdanm 86:04dd9b1680ae 529 \return Base Priority register value
bogdanm 86:04dd9b1680ae 530 */
bogdanm 86:04dd9b1680ae 531 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_BASEPRI(void)
bogdanm 86:04dd9b1680ae 532 {
bogdanm 86:04dd9b1680ae 533 uint32_t result;
bogdanm 86:04dd9b1680ae 534
Kojto 110:165afa46840b 535 __ASM volatile ("MRS %0, basepri" : "=r" (result) );
bogdanm 86:04dd9b1680ae 536 return(result);
bogdanm 86:04dd9b1680ae 537 }
bogdanm 86:04dd9b1680ae 538
bogdanm 86:04dd9b1680ae 539
bogdanm 86:04dd9b1680ae 540 /** \brief Set Base Priority
bogdanm 86:04dd9b1680ae 541
bogdanm 86:04dd9b1680ae 542 This function assigns the given value to the Base Priority register.
bogdanm 86:04dd9b1680ae 543
bogdanm 86:04dd9b1680ae 544 \param [in] basePri Base Priority value to set
bogdanm 86:04dd9b1680ae 545 */
bogdanm 86:04dd9b1680ae 546 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_BASEPRI(uint32_t value)
bogdanm 86:04dd9b1680ae 547 {
bogdanm 86:04dd9b1680ae 548 __ASM volatile ("MSR basepri, %0" : : "r" (value) : "memory");
bogdanm 86:04dd9b1680ae 549 }
bogdanm 86:04dd9b1680ae 550
bogdanm 86:04dd9b1680ae 551
Kojto 110:165afa46840b 552 /** \brief Set Base Priority with condition
Kojto 110:165afa46840b 553
Kojto 110:165afa46840b 554 This function assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
Kojto 110:165afa46840b 555 or the new value increases the BASEPRI priority level.
Kojto 110:165afa46840b 556
Kojto 110:165afa46840b 557 \param [in] basePri Base Priority value to set
Kojto 110:165afa46840b 558 */
Kojto 110:165afa46840b 559 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_BASEPRI_MAX(uint32_t value)
Kojto 110:165afa46840b 560 {
Kojto 110:165afa46840b 561 __ASM volatile ("MSR basepri_max, %0" : : "r" (value) : "memory");
Kojto 110:165afa46840b 562 }
Kojto 110:165afa46840b 563
Kojto 110:165afa46840b 564
bogdanm 86:04dd9b1680ae 565 /** \brief Get Fault Mask
bogdanm 86:04dd9b1680ae 566
bogdanm 86:04dd9b1680ae 567 This function returns the current value of the Fault Mask register.
bogdanm 86:04dd9b1680ae 568
bogdanm 86:04dd9b1680ae 569 \return Fault Mask register value
bogdanm 86:04dd9b1680ae 570 */
bogdanm 86:04dd9b1680ae 571 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FAULTMASK(void)
bogdanm 86:04dd9b1680ae 572 {
bogdanm 86:04dd9b1680ae 573 uint32_t result;
bogdanm 86:04dd9b1680ae 574
bogdanm 86:04dd9b1680ae 575 __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
bogdanm 86:04dd9b1680ae 576 return(result);
bogdanm 86:04dd9b1680ae 577 }
bogdanm 86:04dd9b1680ae 578
bogdanm 86:04dd9b1680ae 579
bogdanm 86:04dd9b1680ae 580 /** \brief Set Fault Mask
bogdanm 86:04dd9b1680ae 581
bogdanm 86:04dd9b1680ae 582 This function assigns the given value to the Fault Mask register.
bogdanm 86:04dd9b1680ae 583
bogdanm 86:04dd9b1680ae 584 \param [in] faultMask Fault Mask value to set
bogdanm 86:04dd9b1680ae 585 */
bogdanm 86:04dd9b1680ae 586 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
bogdanm 86:04dd9b1680ae 587 {
bogdanm 86:04dd9b1680ae 588 __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory");
bogdanm 86:04dd9b1680ae 589 }
bogdanm 86:04dd9b1680ae 590
bogdanm 86:04dd9b1680ae 591 #endif /* (__CORTEX_M >= 0x03) */
bogdanm 86:04dd9b1680ae 592
bogdanm 86:04dd9b1680ae 593
Kojto 110:165afa46840b 594 #if (__CORTEX_M == 0x04) || (__CORTEX_M == 0x07)
bogdanm 86:04dd9b1680ae 595
bogdanm 86:04dd9b1680ae 596 /** \brief Get FPSCR
bogdanm 86:04dd9b1680ae 597
bogdanm 86:04dd9b1680ae 598 This function returns the current value of the Floating Point Status/Control register.
bogdanm 86:04dd9b1680ae 599
bogdanm 86:04dd9b1680ae 600 \return Floating Point Status/Control register value
bogdanm 86:04dd9b1680ae 601 */
bogdanm 86:04dd9b1680ae 602 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPSCR(void)
bogdanm 86:04dd9b1680ae 603 {
bogdanm 86:04dd9b1680ae 604 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
bogdanm 86:04dd9b1680ae 605 uint32_t result;
bogdanm 86:04dd9b1680ae 606
bogdanm 86:04dd9b1680ae 607 /* Empty asm statement works as a scheduling barrier */
bogdanm 86:04dd9b1680ae 608 __ASM volatile ("");
bogdanm 86:04dd9b1680ae 609 __ASM volatile ("VMRS %0, fpscr" : "=r" (result) );
bogdanm 86:04dd9b1680ae 610 __ASM volatile ("");
bogdanm 86:04dd9b1680ae 611 return(result);
bogdanm 86:04dd9b1680ae 612 #else
bogdanm 86:04dd9b1680ae 613 return(0);
bogdanm 86:04dd9b1680ae 614 #endif
bogdanm 86:04dd9b1680ae 615 }
bogdanm 86:04dd9b1680ae 616
bogdanm 86:04dd9b1680ae 617
bogdanm 86:04dd9b1680ae 618 /** \brief Set FPSCR
bogdanm 86:04dd9b1680ae 619
bogdanm 86:04dd9b1680ae 620 This function assigns the given value to the Floating Point Status/Control register.
bogdanm 86:04dd9b1680ae 621
bogdanm 86:04dd9b1680ae 622 \param [in] fpscr Floating Point Status/Control value to set
bogdanm 86:04dd9b1680ae 623 */
bogdanm 86:04dd9b1680ae 624 __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
bogdanm 86:04dd9b1680ae 625 {
bogdanm 86:04dd9b1680ae 626 #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
bogdanm 86:04dd9b1680ae 627 /* Empty asm statement works as a scheduling barrier */
bogdanm 86:04dd9b1680ae 628 __ASM volatile ("");
bogdanm 86:04dd9b1680ae 629 __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc");
bogdanm 86:04dd9b1680ae 630 __ASM volatile ("");
bogdanm 86:04dd9b1680ae 631 #endif
bogdanm 86:04dd9b1680ae 632 }
bogdanm 86:04dd9b1680ae 633
Kojto 110:165afa46840b 634 #endif /* (__CORTEX_M == 0x04) || (__CORTEX_M == 0x07) */
Kojto 110:165afa46840b 635
Kojto 110:165afa46840b 636
Kojto 110:165afa46840b 637 #elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
Kojto 110:165afa46840b 638 /* IAR iccarm specific functions */
Kojto 110:165afa46840b 639 #include <cmsis_iar.h>
Kojto 110:165afa46840b 640
Kojto 110:165afa46840b 641
Kojto 110:165afa46840b 642 #elif defined ( __TMS470__ ) /*---------------- TI CCS Compiler ------------------*/
Kojto 110:165afa46840b 643 /* TI CCS specific functions */
Kojto 110:165afa46840b 644 #include <cmsis_ccs.h>
bogdanm 86:04dd9b1680ae 645
bogdanm 86:04dd9b1680ae 646
bogdanm 86:04dd9b1680ae 647 #elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
bogdanm 86:04dd9b1680ae 648 /* TASKING carm specific functions */
bogdanm 86:04dd9b1680ae 649 /*
bogdanm 86:04dd9b1680ae 650 * The CMSIS functions have been implemented as intrinsics in the compiler.
Kojto 110:165afa46840b 651 * Please use "carm -?i" to get an up to date list of all intrinsics,
bogdanm 86:04dd9b1680ae 652 * Including the CMSIS ones.
bogdanm 86:04dd9b1680ae 653 */
bogdanm 86:04dd9b1680ae 654
Kojto 110:165afa46840b 655
Kojto 110:165afa46840b 656 #elif defined ( __CSMC__ ) /*------------------ COSMIC Compiler -------------------*/
Kojto 110:165afa46840b 657 /* Cosmic specific functions */
Kojto 110:165afa46840b 658 #include <cmsis_csm.h>
Kojto 110:165afa46840b 659
bogdanm 86:04dd9b1680ae 660 #endif
bogdanm 86:04dd9b1680ae 661
bogdanm 86:04dd9b1680ae 662 /*@} end of CMSIS_Core_RegAccFunctions */
bogdanm 86:04dd9b1680ae 663
bogdanm 86:04dd9b1680ae 664 #endif /* __CORE_CMFUNC_H */