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:
<>
Date:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Parent:
120:7c328cabac7e
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

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