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:
Wed Apr 12 16:07:08 2017 +0100
Revision:
140:97feb9bacc10
Parent:
110:165afa46840b
Release 140 of the mbed library

Ports for Upcoming Targets

3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982

Who changed what in which revision?

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