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:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
110:165afa46840b
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

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