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

Fork of mbed by mbed official

Committer:
Mikchel
Date:
Sun May 03 16:04:42 2015 +0000
Revision:
99:7f6c6de930c0
Parent:
93:e188a91d3eaa
12

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 93:e188a91d3eaa 1 /**************************************************************************//**
Kojto 93:e188a91d3eaa 2 * @file core_cmInstr.h
Kojto 93:e188a91d3eaa 3 * @brief CMSIS Cortex-M Core Instruction Access Header File
Kojto 93:e188a91d3eaa 4 * @version V3.20
Kojto 93:e188a91d3eaa 5 * @date 05. March 2013
Kojto 93:e188a91d3eaa 6 *
Kojto 93:e188a91d3eaa 7 * @note
Kojto 93:e188a91d3eaa 8 *
Kojto 93:e188a91d3eaa 9 ******************************************************************************/
Kojto 93:e188a91d3eaa 10 /* Copyright (c) 2009 - 2013 ARM LIMITED
Kojto 93:e188a91d3eaa 11
Kojto 93:e188a91d3eaa 12 All rights reserved.
Kojto 93:e188a91d3eaa 13 Redistribution and use in source and binary forms, with or without
Kojto 93:e188a91d3eaa 14 modification, are permitted provided that the following conditions are met:
Kojto 93:e188a91d3eaa 15 - Redistributions of source code must retain the above copyright
Kojto 93:e188a91d3eaa 16 notice, this list of conditions and the following disclaimer.
Kojto 93:e188a91d3eaa 17 - Redistributions in binary form must reproduce the above copyright
Kojto 93:e188a91d3eaa 18 notice, this list of conditions and the following disclaimer in the
Kojto 93:e188a91d3eaa 19 documentation and/or other materials provided with the distribution.
Kojto 93:e188a91d3eaa 20 - Neither the name of ARM nor the names of its contributors may be used
Kojto 93:e188a91d3eaa 21 to endorse or promote products derived from this software without
Kojto 93:e188a91d3eaa 22 specific prior written permission.
Kojto 93:e188a91d3eaa 23 *
Kojto 93:e188a91d3eaa 24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 93:e188a91d3eaa 25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 93:e188a91d3eaa 26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Kojto 93:e188a91d3eaa 27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
Kojto 93:e188a91d3eaa 28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Kojto 93:e188a91d3eaa 29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Kojto 93:e188a91d3eaa 30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Kojto 93:e188a91d3eaa 31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
Kojto 93:e188a91d3eaa 32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
Kojto 93:e188a91d3eaa 33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Kojto 93:e188a91d3eaa 34 POSSIBILITY OF SUCH DAMAGE.
Kojto 93:e188a91d3eaa 35 ---------------------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 36
Kojto 93:e188a91d3eaa 37
Kojto 93:e188a91d3eaa 38 #ifndef __CORE_CMINSTR_H
Kojto 93:e188a91d3eaa 39 #define __CORE_CMINSTR_H
Kojto 93:e188a91d3eaa 40
Kojto 93:e188a91d3eaa 41
Kojto 93:e188a91d3eaa 42 /* ########################## Core Instruction Access ######################### */
Kojto 93:e188a91d3eaa 43 /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
Kojto 93:e188a91d3eaa 44 Access to dedicated instructions
Kojto 93:e188a91d3eaa 45 @{
Kojto 93:e188a91d3eaa 46 */
Kojto 93:e188a91d3eaa 47
Kojto 93:e188a91d3eaa 48 #if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
Kojto 93:e188a91d3eaa 49 /* ARM armcc specific functions */
Kojto 93:e188a91d3eaa 50
Kojto 93:e188a91d3eaa 51 #if (__ARMCC_VERSION < 400677)
Kojto 93:e188a91d3eaa 52 #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
Kojto 93:e188a91d3eaa 53 #endif
Kojto 93:e188a91d3eaa 54
Kojto 93:e188a91d3eaa 55
Kojto 93:e188a91d3eaa 56 /** \brief No Operation
Kojto 93:e188a91d3eaa 57
Kojto 93:e188a91d3eaa 58 No Operation does nothing. This instruction can be used for code alignment purposes.
Kojto 93:e188a91d3eaa 59 */
Kojto 93:e188a91d3eaa 60 #define __NOP __nop
Kojto 93:e188a91d3eaa 61
Kojto 93:e188a91d3eaa 62
Kojto 93:e188a91d3eaa 63 /** \brief Wait For Interrupt
Kojto 93:e188a91d3eaa 64
Kojto 93:e188a91d3eaa 65 Wait For Interrupt is a hint instruction that suspends execution
Kojto 93:e188a91d3eaa 66 until one of a number of events occurs.
Kojto 93:e188a91d3eaa 67 */
Kojto 93:e188a91d3eaa 68 #define __WFI __wfi
Kojto 93:e188a91d3eaa 69
Kojto 93:e188a91d3eaa 70
Kojto 93:e188a91d3eaa 71 /** \brief Wait For Event
Kojto 93:e188a91d3eaa 72
Kojto 93:e188a91d3eaa 73 Wait For Event is a hint instruction that permits the processor to enter
Kojto 93:e188a91d3eaa 74 a low-power state until one of a number of events occurs.
Kojto 93:e188a91d3eaa 75 */
Kojto 93:e188a91d3eaa 76 #define __WFE __wfe
Kojto 93:e188a91d3eaa 77
Kojto 93:e188a91d3eaa 78
Kojto 93:e188a91d3eaa 79 /** \brief Send Event
Kojto 93:e188a91d3eaa 80
Kojto 93:e188a91d3eaa 81 Send Event is a hint instruction. It causes an event to be signaled to the CPU.
Kojto 93:e188a91d3eaa 82 */
Kojto 93:e188a91d3eaa 83 #define __SEV __sev
Kojto 93:e188a91d3eaa 84
Kojto 93:e188a91d3eaa 85
Kojto 93:e188a91d3eaa 86 /** \brief Instruction Synchronization Barrier
Kojto 93:e188a91d3eaa 87
Kojto 93:e188a91d3eaa 88 Instruction Synchronization Barrier flushes the pipeline in the processor,
Kojto 93:e188a91d3eaa 89 so that all instructions following the ISB are fetched from cache or
Kojto 93:e188a91d3eaa 90 memory, after the instruction has been completed.
Kojto 93:e188a91d3eaa 91 */
Kojto 93:e188a91d3eaa 92 #define __ISB() __isb(0xF)
Kojto 93:e188a91d3eaa 93
Kojto 93:e188a91d3eaa 94
Kojto 93:e188a91d3eaa 95 /** \brief Data Synchronization Barrier
Kojto 93:e188a91d3eaa 96
Kojto 93:e188a91d3eaa 97 This function acts as a special kind of Data Memory Barrier.
Kojto 93:e188a91d3eaa 98 It completes when all explicit memory accesses before this instruction complete.
Kojto 93:e188a91d3eaa 99 */
Kojto 93:e188a91d3eaa 100 #define __DSB() __dsb(0xF)
Kojto 93:e188a91d3eaa 101
Kojto 93:e188a91d3eaa 102
Kojto 93:e188a91d3eaa 103 /** \brief Data Memory Barrier
Kojto 93:e188a91d3eaa 104
Kojto 93:e188a91d3eaa 105 This function ensures the apparent order of the explicit memory operations before
Kojto 93:e188a91d3eaa 106 and after the instruction, without ensuring their completion.
Kojto 93:e188a91d3eaa 107 */
Kojto 93:e188a91d3eaa 108 #define __DMB() __dmb(0xF)
Kojto 93:e188a91d3eaa 109
Kojto 93:e188a91d3eaa 110
Kojto 93:e188a91d3eaa 111 /** \brief Reverse byte order (32 bit)
Kojto 93:e188a91d3eaa 112
Kojto 93:e188a91d3eaa 113 This function reverses the byte order in integer value.
Kojto 93:e188a91d3eaa 114
Kojto 93:e188a91d3eaa 115 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 116 \return Reversed value
Kojto 93:e188a91d3eaa 117 */
Kojto 93:e188a91d3eaa 118 #define __REV __rev
Kojto 93:e188a91d3eaa 119
Kojto 93:e188a91d3eaa 120
Kojto 93:e188a91d3eaa 121 /** \brief Reverse byte order (16 bit)
Kojto 93:e188a91d3eaa 122
Kojto 93:e188a91d3eaa 123 This function reverses the byte order in two unsigned short values.
Kojto 93:e188a91d3eaa 124
Kojto 93:e188a91d3eaa 125 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 126 \return Reversed value
Kojto 93:e188a91d3eaa 127 */
Kojto 93:e188a91d3eaa 128 #ifndef __NO_EMBEDDED_ASM
Kojto 93:e188a91d3eaa 129 __attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
Kojto 93:e188a91d3eaa 130 {
Kojto 93:e188a91d3eaa 131 rev16 r0, r0
Kojto 93:e188a91d3eaa 132 bx lr
Kojto 93:e188a91d3eaa 133 }
Kojto 93:e188a91d3eaa 134 #endif
Kojto 93:e188a91d3eaa 135
Kojto 93:e188a91d3eaa 136 /** \brief Reverse byte order in signed short value
Kojto 93:e188a91d3eaa 137
Kojto 93:e188a91d3eaa 138 This function reverses the byte order in a signed short value with sign extension to integer.
Kojto 93:e188a91d3eaa 139
Kojto 93:e188a91d3eaa 140 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 141 \return Reversed value
Kojto 93:e188a91d3eaa 142 */
Kojto 93:e188a91d3eaa 143 #ifndef __NO_EMBEDDED_ASM
Kojto 93:e188a91d3eaa 144 __attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int32_t __REVSH(int32_t value)
Kojto 93:e188a91d3eaa 145 {
Kojto 93:e188a91d3eaa 146 revsh r0, r0
Kojto 93:e188a91d3eaa 147 bx lr
Kojto 93:e188a91d3eaa 148 }
Kojto 93:e188a91d3eaa 149 #endif
Kojto 93:e188a91d3eaa 150
Kojto 93:e188a91d3eaa 151
Kojto 93:e188a91d3eaa 152 /** \brief Rotate Right in unsigned value (32 bit)
Kojto 93:e188a91d3eaa 153
Kojto 93:e188a91d3eaa 154 This function Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
Kojto 93:e188a91d3eaa 155
Kojto 93:e188a91d3eaa 156 \param [in] value Value to rotate
Kojto 93:e188a91d3eaa 157 \param [in] value Number of Bits to rotate
Kojto 93:e188a91d3eaa 158 \return Rotated value
Kojto 93:e188a91d3eaa 159 */
Kojto 93:e188a91d3eaa 160 #define __ROR __ror
Kojto 93:e188a91d3eaa 161
Kojto 93:e188a91d3eaa 162
Kojto 93:e188a91d3eaa 163 /** \brief Breakpoint
Kojto 93:e188a91d3eaa 164
Kojto 93:e188a91d3eaa 165 This function causes the processor to enter Debug state.
Kojto 93:e188a91d3eaa 166 Debug tools can use this to investigate system state when the instruction at a particular address is reached.
Kojto 93:e188a91d3eaa 167
Kojto 93:e188a91d3eaa 168 \param [in] value is ignored by the processor.
Kojto 93:e188a91d3eaa 169 If required, a debugger can use it to store additional information about the breakpoint.
Kojto 93:e188a91d3eaa 170 */
Kojto 93:e188a91d3eaa 171 #define __BKPT(value) __breakpoint(value)
Kojto 93:e188a91d3eaa 172
Kojto 93:e188a91d3eaa 173
Kojto 93:e188a91d3eaa 174 #if (__CORTEX_M >= 0x03)
Kojto 93:e188a91d3eaa 175
Kojto 93:e188a91d3eaa 176 /** \brief Reverse bit order of value
Kojto 93:e188a91d3eaa 177
Kojto 93:e188a91d3eaa 178 This function reverses the bit order of the given value.
Kojto 93:e188a91d3eaa 179
Kojto 93:e188a91d3eaa 180 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 181 \return Reversed value
Kojto 93:e188a91d3eaa 182 */
Kojto 93:e188a91d3eaa 183 #define __RBIT __rbit
Kojto 93:e188a91d3eaa 184
Kojto 93:e188a91d3eaa 185
Kojto 93:e188a91d3eaa 186 /** \brief LDR Exclusive (8 bit)
Kojto 93:e188a91d3eaa 187
Kojto 93:e188a91d3eaa 188 This function performs a exclusive LDR command for 8 bit value.
Kojto 93:e188a91d3eaa 189
Kojto 93:e188a91d3eaa 190 \param [in] ptr Pointer to data
Kojto 93:e188a91d3eaa 191 \return value of type uint8_t at (*ptr)
Kojto 93:e188a91d3eaa 192 */
Kojto 93:e188a91d3eaa 193 #define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr))
Kojto 93:e188a91d3eaa 194
Kojto 93:e188a91d3eaa 195
Kojto 93:e188a91d3eaa 196 /** \brief LDR Exclusive (16 bit)
Kojto 93:e188a91d3eaa 197
Kojto 93:e188a91d3eaa 198 This function performs a exclusive LDR command for 16 bit values.
Kojto 93:e188a91d3eaa 199
Kojto 93:e188a91d3eaa 200 \param [in] ptr Pointer to data
Kojto 93:e188a91d3eaa 201 \return value of type uint16_t at (*ptr)
Kojto 93:e188a91d3eaa 202 */
Kojto 93:e188a91d3eaa 203 #define __LDREXH(ptr) ((uint16_t) __ldrex(ptr))
Kojto 93:e188a91d3eaa 204
Kojto 93:e188a91d3eaa 205
Kojto 93:e188a91d3eaa 206 /** \brief LDR Exclusive (32 bit)
Kojto 93:e188a91d3eaa 207
Kojto 93:e188a91d3eaa 208 This function performs a exclusive LDR command for 32 bit values.
Kojto 93:e188a91d3eaa 209
Kojto 93:e188a91d3eaa 210 \param [in] ptr Pointer to data
Kojto 93:e188a91d3eaa 211 \return value of type uint32_t at (*ptr)
Kojto 93:e188a91d3eaa 212 */
Kojto 93:e188a91d3eaa 213 #define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr))
Kojto 93:e188a91d3eaa 214
Kojto 93:e188a91d3eaa 215
Kojto 93:e188a91d3eaa 216 /** \brief STR Exclusive (8 bit)
Kojto 93:e188a91d3eaa 217
Kojto 93:e188a91d3eaa 218 This function performs a exclusive STR command for 8 bit values.
Kojto 93:e188a91d3eaa 219
Kojto 93:e188a91d3eaa 220 \param [in] value Value to store
Kojto 93:e188a91d3eaa 221 \param [in] ptr Pointer to location
Kojto 93:e188a91d3eaa 222 \return 0 Function succeeded
Kojto 93:e188a91d3eaa 223 \return 1 Function failed
Kojto 93:e188a91d3eaa 224 */
Kojto 93:e188a91d3eaa 225 #define __STREXB(value, ptr) __strex(value, ptr)
Kojto 93:e188a91d3eaa 226
Kojto 93:e188a91d3eaa 227
Kojto 93:e188a91d3eaa 228 /** \brief STR Exclusive (16 bit)
Kojto 93:e188a91d3eaa 229
Kojto 93:e188a91d3eaa 230 This function performs a exclusive STR command for 16 bit values.
Kojto 93:e188a91d3eaa 231
Kojto 93:e188a91d3eaa 232 \param [in] value Value to store
Kojto 93:e188a91d3eaa 233 \param [in] ptr Pointer to location
Kojto 93:e188a91d3eaa 234 \return 0 Function succeeded
Kojto 93:e188a91d3eaa 235 \return 1 Function failed
Kojto 93:e188a91d3eaa 236 */
Kojto 93:e188a91d3eaa 237 #define __STREXH(value, ptr) __strex(value, ptr)
Kojto 93:e188a91d3eaa 238
Kojto 93:e188a91d3eaa 239
Kojto 93:e188a91d3eaa 240 /** \brief STR Exclusive (32 bit)
Kojto 93:e188a91d3eaa 241
Kojto 93:e188a91d3eaa 242 This function performs a exclusive STR command for 32 bit values.
Kojto 93:e188a91d3eaa 243
Kojto 93:e188a91d3eaa 244 \param [in] value Value to store
Kojto 93:e188a91d3eaa 245 \param [in] ptr Pointer to location
Kojto 93:e188a91d3eaa 246 \return 0 Function succeeded
Kojto 93:e188a91d3eaa 247 \return 1 Function failed
Kojto 93:e188a91d3eaa 248 */
Kojto 93:e188a91d3eaa 249 #define __STREXW(value, ptr) __strex(value, ptr)
Kojto 93:e188a91d3eaa 250
Kojto 93:e188a91d3eaa 251
Kojto 93:e188a91d3eaa 252 /** \brief Remove the exclusive lock
Kojto 93:e188a91d3eaa 253
Kojto 93:e188a91d3eaa 254 This function removes the exclusive lock which is created by LDREX.
Kojto 93:e188a91d3eaa 255
Kojto 93:e188a91d3eaa 256 */
Kojto 93:e188a91d3eaa 257 #define __CLREX __clrex
Kojto 93:e188a91d3eaa 258
Kojto 93:e188a91d3eaa 259
Kojto 93:e188a91d3eaa 260 /** \brief Signed Saturate
Kojto 93:e188a91d3eaa 261
Kojto 93:e188a91d3eaa 262 This function saturates a signed value.
Kojto 93:e188a91d3eaa 263
Kojto 93:e188a91d3eaa 264 \param [in] value Value to be saturated
Kojto 93:e188a91d3eaa 265 \param [in] sat Bit position to saturate to (1..32)
Kojto 93:e188a91d3eaa 266 \return Saturated value
Kojto 93:e188a91d3eaa 267 */
Kojto 93:e188a91d3eaa 268 #define __SSAT __ssat
Kojto 93:e188a91d3eaa 269
Kojto 93:e188a91d3eaa 270
Kojto 93:e188a91d3eaa 271 /** \brief Unsigned Saturate
Kojto 93:e188a91d3eaa 272
Kojto 93:e188a91d3eaa 273 This function saturates an unsigned value.
Kojto 93:e188a91d3eaa 274
Kojto 93:e188a91d3eaa 275 \param [in] value Value to be saturated
Kojto 93:e188a91d3eaa 276 \param [in] sat Bit position to saturate to (0..31)
Kojto 93:e188a91d3eaa 277 \return Saturated value
Kojto 93:e188a91d3eaa 278 */
Kojto 93:e188a91d3eaa 279 #define __USAT __usat
Kojto 93:e188a91d3eaa 280
Kojto 93:e188a91d3eaa 281
Kojto 93:e188a91d3eaa 282 /** \brief Count leading zeros
Kojto 93:e188a91d3eaa 283
Kojto 93:e188a91d3eaa 284 This function counts the number of leading zeros of a data value.
Kojto 93:e188a91d3eaa 285
Kojto 93:e188a91d3eaa 286 \param [in] value Value to count the leading zeros
Kojto 93:e188a91d3eaa 287 \return number of leading zeros in value
Kojto 93:e188a91d3eaa 288 */
Kojto 93:e188a91d3eaa 289 #define __CLZ __clz
Kojto 93:e188a91d3eaa 290
Kojto 93:e188a91d3eaa 291 #endif /* (__CORTEX_M >= 0x03) */
Kojto 93:e188a91d3eaa 292
Kojto 93:e188a91d3eaa 293
Kojto 93:e188a91d3eaa 294
Kojto 93:e188a91d3eaa 295 #elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
Kojto 93:e188a91d3eaa 296 /* IAR iccarm specific functions */
Kojto 93:e188a91d3eaa 297
Kojto 93:e188a91d3eaa 298 #include <cmsis_iar.h>
Kojto 93:e188a91d3eaa 299
Kojto 93:e188a91d3eaa 300
Kojto 93:e188a91d3eaa 301 #elif defined ( __TMS470__ ) /*---------------- TI CCS Compiler ------------------*/
Kojto 93:e188a91d3eaa 302 /* TI CCS specific functions */
Kojto 93:e188a91d3eaa 303
Kojto 93:e188a91d3eaa 304 #include <cmsis_ccs.h>
Kojto 93:e188a91d3eaa 305
Kojto 93:e188a91d3eaa 306
Kojto 93:e188a91d3eaa 307 #elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
Kojto 93:e188a91d3eaa 308 /* GNU gcc specific functions */
Kojto 93:e188a91d3eaa 309
Kojto 93:e188a91d3eaa 310 /* Define macros for porting to both thumb1 and thumb2.
Kojto 93:e188a91d3eaa 311 * For thumb1, use low register (r0-r7), specified by constrant "l"
Kojto 93:e188a91d3eaa 312 * Otherwise, use general registers, specified by constrant "r" */
Kojto 93:e188a91d3eaa 313 #if defined (__thumb__) && !defined (__thumb2__)
Kojto 93:e188a91d3eaa 314 #define __CMSIS_GCC_OUT_REG(r) "=l" (r)
Kojto 93:e188a91d3eaa 315 #define __CMSIS_GCC_USE_REG(r) "l" (r)
Kojto 93:e188a91d3eaa 316 #else
Kojto 93:e188a91d3eaa 317 #define __CMSIS_GCC_OUT_REG(r) "=r" (r)
Kojto 93:e188a91d3eaa 318 #define __CMSIS_GCC_USE_REG(r) "r" (r)
Kojto 93:e188a91d3eaa 319 #endif
Kojto 93:e188a91d3eaa 320
Kojto 93:e188a91d3eaa 321 /** \brief No Operation
Kojto 93:e188a91d3eaa 322
Kojto 93:e188a91d3eaa 323 No Operation does nothing. This instruction can be used for code alignment purposes.
Kojto 93:e188a91d3eaa 324 */
Kojto 93:e188a91d3eaa 325 __attribute__( ( always_inline ) ) __STATIC_INLINE void __NOP(void)
Kojto 93:e188a91d3eaa 326 {
Kojto 93:e188a91d3eaa 327 __ASM volatile ("nop");
Kojto 93:e188a91d3eaa 328 }
Kojto 93:e188a91d3eaa 329
Kojto 93:e188a91d3eaa 330
Kojto 93:e188a91d3eaa 331 /** \brief Wait For Interrupt
Kojto 93:e188a91d3eaa 332
Kojto 93:e188a91d3eaa 333 Wait For Interrupt is a hint instruction that suspends execution
Kojto 93:e188a91d3eaa 334 until one of a number of events occurs.
Kojto 93:e188a91d3eaa 335 */
Kojto 93:e188a91d3eaa 336 __attribute__( ( always_inline ) ) __STATIC_INLINE void __WFI(void)
Kojto 93:e188a91d3eaa 337 {
Kojto 93:e188a91d3eaa 338 __ASM volatile ("wfi");
Kojto 93:e188a91d3eaa 339 }
Kojto 93:e188a91d3eaa 340
Kojto 93:e188a91d3eaa 341
Kojto 93:e188a91d3eaa 342 /** \brief Wait For Event
Kojto 93:e188a91d3eaa 343
Kojto 93:e188a91d3eaa 344 Wait For Event is a hint instruction that permits the processor to enter
Kojto 93:e188a91d3eaa 345 a low-power state until one of a number of events occurs.
Kojto 93:e188a91d3eaa 346 */
Kojto 93:e188a91d3eaa 347 __attribute__( ( always_inline ) ) __STATIC_INLINE void __WFE(void)
Kojto 93:e188a91d3eaa 348 {
Kojto 93:e188a91d3eaa 349 __ASM volatile ("wfe");
Kojto 93:e188a91d3eaa 350 }
Kojto 93:e188a91d3eaa 351
Kojto 93:e188a91d3eaa 352
Kojto 93:e188a91d3eaa 353 /** \brief Send Event
Kojto 93:e188a91d3eaa 354
Kojto 93:e188a91d3eaa 355 Send Event is a hint instruction. It causes an event to be signaled to the CPU.
Kojto 93:e188a91d3eaa 356 */
Kojto 93:e188a91d3eaa 357 __attribute__( ( always_inline ) ) __STATIC_INLINE void __SEV(void)
Kojto 93:e188a91d3eaa 358 {
Kojto 93:e188a91d3eaa 359 __ASM volatile ("sev");
Kojto 93:e188a91d3eaa 360 }
Kojto 93:e188a91d3eaa 361
Kojto 93:e188a91d3eaa 362
Kojto 93:e188a91d3eaa 363 /** \brief Instruction Synchronization Barrier
Kojto 93:e188a91d3eaa 364
Kojto 93:e188a91d3eaa 365 Instruction Synchronization Barrier flushes the pipeline in the processor,
Kojto 93:e188a91d3eaa 366 so that all instructions following the ISB are fetched from cache or
Kojto 93:e188a91d3eaa 367 memory, after the instruction has been completed.
Kojto 93:e188a91d3eaa 368 */
Kojto 93:e188a91d3eaa 369 __attribute__( ( always_inline ) ) __STATIC_INLINE void __ISB(void)
Kojto 93:e188a91d3eaa 370 {
Kojto 93:e188a91d3eaa 371 __ASM volatile ("isb");
Kojto 93:e188a91d3eaa 372 }
Kojto 93:e188a91d3eaa 373
Kojto 93:e188a91d3eaa 374
Kojto 93:e188a91d3eaa 375 /** \brief Data Synchronization Barrier
Kojto 93:e188a91d3eaa 376
Kojto 93:e188a91d3eaa 377 This function acts as a special kind of Data Memory Barrier.
Kojto 93:e188a91d3eaa 378 It completes when all explicit memory accesses before this instruction complete.
Kojto 93:e188a91d3eaa 379 */
Kojto 93:e188a91d3eaa 380 __attribute__( ( always_inline ) ) __STATIC_INLINE void __DSB(void)
Kojto 93:e188a91d3eaa 381 {
Kojto 93:e188a91d3eaa 382 __ASM volatile ("dsb");
Kojto 93:e188a91d3eaa 383 }
Kojto 93:e188a91d3eaa 384
Kojto 93:e188a91d3eaa 385
Kojto 93:e188a91d3eaa 386 /** \brief Data Memory Barrier
Kojto 93:e188a91d3eaa 387
Kojto 93:e188a91d3eaa 388 This function ensures the apparent order of the explicit memory operations before
Kojto 93:e188a91d3eaa 389 and after the instruction, without ensuring their completion.
Kojto 93:e188a91d3eaa 390 */
Kojto 93:e188a91d3eaa 391 __attribute__( ( always_inline ) ) __STATIC_INLINE void __DMB(void)
Kojto 93:e188a91d3eaa 392 {
Kojto 93:e188a91d3eaa 393 __ASM volatile ("dmb");
Kojto 93:e188a91d3eaa 394 }
Kojto 93:e188a91d3eaa 395
Kojto 93:e188a91d3eaa 396
Kojto 93:e188a91d3eaa 397 /** \brief Reverse byte order (32 bit)
Kojto 93:e188a91d3eaa 398
Kojto 93:e188a91d3eaa 399 This function reverses the byte order in integer value.
Kojto 93:e188a91d3eaa 400
Kojto 93:e188a91d3eaa 401 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 402 \return Reversed value
Kojto 93:e188a91d3eaa 403 */
Kojto 93:e188a91d3eaa 404 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __REV(uint32_t value)
Kojto 93:e188a91d3eaa 405 {
Kojto 93:e188a91d3eaa 406 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
Kojto 93:e188a91d3eaa 407 return __builtin_bswap32(value);
Kojto 93:e188a91d3eaa 408 #else
Kojto 93:e188a91d3eaa 409 uint32_t result;
Kojto 93:e188a91d3eaa 410
Kojto 93:e188a91d3eaa 411 __ASM volatile ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
Kojto 93:e188a91d3eaa 412 return(result);
Kojto 93:e188a91d3eaa 413 #endif
Kojto 93:e188a91d3eaa 414 }
Kojto 93:e188a91d3eaa 415
Kojto 93:e188a91d3eaa 416
Kojto 93:e188a91d3eaa 417 /** \brief Reverse byte order (16 bit)
Kojto 93:e188a91d3eaa 418
Kojto 93:e188a91d3eaa 419 This function reverses the byte order in two unsigned short values.
Kojto 93:e188a91d3eaa 420
Kojto 93:e188a91d3eaa 421 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 422 \return Reversed value
Kojto 93:e188a91d3eaa 423 */
Kojto 93:e188a91d3eaa 424 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __REV16(uint32_t value)
Kojto 93:e188a91d3eaa 425 {
Kojto 93:e188a91d3eaa 426 uint32_t result;
Kojto 93:e188a91d3eaa 427
Kojto 93:e188a91d3eaa 428 __ASM volatile ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
Kojto 93:e188a91d3eaa 429 return(result);
Kojto 93:e188a91d3eaa 430 }
Kojto 93:e188a91d3eaa 431
Kojto 93:e188a91d3eaa 432
Kojto 93:e188a91d3eaa 433 /** \brief Reverse byte order in signed short value
Kojto 93:e188a91d3eaa 434
Kojto 93:e188a91d3eaa 435 This function reverses the byte order in a signed short value with sign extension to integer.
Kojto 93:e188a91d3eaa 436
Kojto 93:e188a91d3eaa 437 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 438 \return Reversed value
Kojto 93:e188a91d3eaa 439 */
Kojto 93:e188a91d3eaa 440 __attribute__( ( always_inline ) ) __STATIC_INLINE int32_t __REVSH(int32_t value)
Kojto 93:e188a91d3eaa 441 {
Kojto 93:e188a91d3eaa 442 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
Kojto 93:e188a91d3eaa 443 return (short)__builtin_bswap16(value);
Kojto 93:e188a91d3eaa 444 #else
Kojto 93:e188a91d3eaa 445 uint32_t result;
Kojto 93:e188a91d3eaa 446
Kojto 93:e188a91d3eaa 447 __ASM volatile ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
Kojto 93:e188a91d3eaa 448 return(result);
Kojto 93:e188a91d3eaa 449 #endif
Kojto 93:e188a91d3eaa 450 }
Kojto 93:e188a91d3eaa 451
Kojto 93:e188a91d3eaa 452
Kojto 93:e188a91d3eaa 453 /** \brief Rotate Right in unsigned value (32 bit)
Kojto 93:e188a91d3eaa 454
Kojto 93:e188a91d3eaa 455 This function Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
Kojto 93:e188a91d3eaa 456
Kojto 93:e188a91d3eaa 457 \param [in] value Value to rotate
Kojto 93:e188a91d3eaa 458 \param [in] value Number of Bits to rotate
Kojto 93:e188a91d3eaa 459 \return Rotated value
Kojto 93:e188a91d3eaa 460 */
Kojto 93:e188a91d3eaa 461 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __ROR(uint32_t op1, uint32_t op2)
Kojto 93:e188a91d3eaa 462 {
Kojto 93:e188a91d3eaa 463 return (op1 >> op2) | (op1 << (32 - op2));
Kojto 93:e188a91d3eaa 464 }
Kojto 93:e188a91d3eaa 465
Kojto 93:e188a91d3eaa 466
Kojto 93:e188a91d3eaa 467 /** \brief Breakpoint
Kojto 93:e188a91d3eaa 468
Kojto 93:e188a91d3eaa 469 This function causes the processor to enter Debug state.
Kojto 93:e188a91d3eaa 470 Debug tools can use this to investigate system state when the instruction at a particular address is reached.
Kojto 93:e188a91d3eaa 471
Kojto 93:e188a91d3eaa 472 \param [in] value is ignored by the processor.
Kojto 93:e188a91d3eaa 473 If required, a debugger can use it to store additional information about the breakpoint.
Kojto 93:e188a91d3eaa 474 */
Kojto 93:e188a91d3eaa 475 #define __BKPT(value) __ASM volatile ("bkpt "#value)
Kojto 93:e188a91d3eaa 476
Kojto 93:e188a91d3eaa 477
Kojto 93:e188a91d3eaa 478 #if (__CORTEX_M >= 0x03)
Kojto 93:e188a91d3eaa 479
Kojto 93:e188a91d3eaa 480 /** \brief Reverse bit order of value
Kojto 93:e188a91d3eaa 481
Kojto 93:e188a91d3eaa 482 This function reverses the bit order of the given value.
Kojto 93:e188a91d3eaa 483
Kojto 93:e188a91d3eaa 484 \param [in] value Value to reverse
Kojto 93:e188a91d3eaa 485 \return Reversed value
Kojto 93:e188a91d3eaa 486 */
Kojto 93:e188a91d3eaa 487 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
Kojto 93:e188a91d3eaa 488 {
Kojto 93:e188a91d3eaa 489 uint32_t result;
Kojto 93:e188a91d3eaa 490
Kojto 93:e188a91d3eaa 491 __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
Kojto 93:e188a91d3eaa 492 return(result);
Kojto 93:e188a91d3eaa 493 }
Kojto 93:e188a91d3eaa 494
Kojto 93:e188a91d3eaa 495
Kojto 93:e188a91d3eaa 496 /** \brief LDR Exclusive (8 bit)
Kojto 93:e188a91d3eaa 497
Kojto 93:e188a91d3eaa 498 This function performs a exclusive LDR command for 8 bit value.
Kojto 93:e188a91d3eaa 499
Kojto 93:e188a91d3eaa 500 \param [in] ptr Pointer to data
Kojto 93:e188a91d3eaa 501 \return value of type uint8_t at (*ptr)
Kojto 93:e188a91d3eaa 502 */
Kojto 93:e188a91d3eaa 503 __attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __LDREXB(volatile uint8_t *addr)
Kojto 93:e188a91d3eaa 504 {
Kojto 93:e188a91d3eaa 505 uint32_t result;
Kojto 93:e188a91d3eaa 506
Kojto 93:e188a91d3eaa 507 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
Kojto 93:e188a91d3eaa 508 __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) );
Kojto 93:e188a91d3eaa 509 #else
Kojto 93:e188a91d3eaa 510 /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
Kojto 93:e188a91d3eaa 511 accepted by assembler. So has to use following less efficient pattern.
Kojto 93:e188a91d3eaa 512 */
Kojto 93:e188a91d3eaa 513 __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" );
Kojto 93:e188a91d3eaa 514 #endif
Kojto 93:e188a91d3eaa 515 return(result);
Kojto 93:e188a91d3eaa 516 }
Kojto 93:e188a91d3eaa 517
Kojto 93:e188a91d3eaa 518
Kojto 93:e188a91d3eaa 519 /** \brief LDR Exclusive (16 bit)
Kojto 93:e188a91d3eaa 520
Kojto 93:e188a91d3eaa 521 This function performs a exclusive LDR command for 16 bit values.
Kojto 93:e188a91d3eaa 522
Kojto 93:e188a91d3eaa 523 \param [in] ptr Pointer to data
Kojto 93:e188a91d3eaa 524 \return value of type uint16_t at (*ptr)
Kojto 93:e188a91d3eaa 525 */
Kojto 93:e188a91d3eaa 526 __attribute__( ( always_inline ) ) __STATIC_INLINE uint16_t __LDREXH(volatile uint16_t *addr)
Kojto 93:e188a91d3eaa 527 {
Kojto 93:e188a91d3eaa 528 uint32_t result;
Kojto 93:e188a91d3eaa 529
Kojto 93:e188a91d3eaa 530 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
Kojto 93:e188a91d3eaa 531 __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) );
Kojto 93:e188a91d3eaa 532 #else
Kojto 93:e188a91d3eaa 533 /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
Kojto 93:e188a91d3eaa 534 accepted by assembler. So has to use following less efficient pattern.
Kojto 93:e188a91d3eaa 535 */
Kojto 93:e188a91d3eaa 536 __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" );
Kojto 93:e188a91d3eaa 537 #endif
Kojto 93:e188a91d3eaa 538 return(result);
Kojto 93:e188a91d3eaa 539 }
Kojto 93:e188a91d3eaa 540
Kojto 93:e188a91d3eaa 541
Kojto 93:e188a91d3eaa 542 /** \brief LDR Exclusive (32 bit)
Kojto 93:e188a91d3eaa 543
Kojto 93:e188a91d3eaa 544 This function performs a exclusive LDR command for 32 bit values.
Kojto 93:e188a91d3eaa 545
Kojto 93:e188a91d3eaa 546 \param [in] ptr Pointer to data
Kojto 93:e188a91d3eaa 547 \return value of type uint32_t at (*ptr)
Kojto 93:e188a91d3eaa 548 */
Kojto 93:e188a91d3eaa 549 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __LDREXW(volatile uint32_t *addr)
Kojto 93:e188a91d3eaa 550 {
Kojto 93:e188a91d3eaa 551 uint32_t result;
Kojto 93:e188a91d3eaa 552
Kojto 93:e188a91d3eaa 553 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
Kojto 93:e188a91d3eaa 554 return(result);
Kojto 93:e188a91d3eaa 555 }
Kojto 93:e188a91d3eaa 556
Kojto 93:e188a91d3eaa 557
Kojto 93:e188a91d3eaa 558 /** \brief STR Exclusive (8 bit)
Kojto 93:e188a91d3eaa 559
Kojto 93:e188a91d3eaa 560 This function performs a exclusive STR command for 8 bit values.
Kojto 93:e188a91d3eaa 561
Kojto 93:e188a91d3eaa 562 \param [in] value Value to store
Kojto 93:e188a91d3eaa 563 \param [in] ptr Pointer to location
Kojto 93:e188a91d3eaa 564 \return 0 Function succeeded
Kojto 93:e188a91d3eaa 565 \return 1 Function failed
Kojto 93:e188a91d3eaa 566 */
Kojto 93:e188a91d3eaa 567 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr)
Kojto 93:e188a91d3eaa 568 {
Kojto 93:e188a91d3eaa 569 uint32_t result;
Kojto 93:e188a91d3eaa 570
Kojto 93:e188a91d3eaa 571 __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
Kojto 93:e188a91d3eaa 572 return(result);
Kojto 93:e188a91d3eaa 573 }
Kojto 93:e188a91d3eaa 574
Kojto 93:e188a91d3eaa 575
Kojto 93:e188a91d3eaa 576 /** \brief STR Exclusive (16 bit)
Kojto 93:e188a91d3eaa 577
Kojto 93:e188a91d3eaa 578 This function performs a exclusive STR command for 16 bit values.
Kojto 93:e188a91d3eaa 579
Kojto 93:e188a91d3eaa 580 \param [in] value Value to store
Kojto 93:e188a91d3eaa 581 \param [in] ptr Pointer to location
Kojto 93:e188a91d3eaa 582 \return 0 Function succeeded
Kojto 93:e188a91d3eaa 583 \return 1 Function failed
Kojto 93:e188a91d3eaa 584 */
Kojto 93:e188a91d3eaa 585 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr)
Kojto 93:e188a91d3eaa 586 {
Kojto 93:e188a91d3eaa 587 uint32_t result;
Kojto 93:e188a91d3eaa 588
Kojto 93:e188a91d3eaa 589 __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
Kojto 93:e188a91d3eaa 590 return(result);
Kojto 93:e188a91d3eaa 591 }
Kojto 93:e188a91d3eaa 592
Kojto 93:e188a91d3eaa 593
Kojto 93:e188a91d3eaa 594 /** \brief STR Exclusive (32 bit)
Kojto 93:e188a91d3eaa 595
Kojto 93:e188a91d3eaa 596 This function performs a exclusive STR command for 32 bit values.
Kojto 93:e188a91d3eaa 597
Kojto 93:e188a91d3eaa 598 \param [in] value Value to store
Kojto 93:e188a91d3eaa 599 \param [in] ptr Pointer to location
Kojto 93:e188a91d3eaa 600 \return 0 Function succeeded
Kojto 93:e188a91d3eaa 601 \return 1 Function failed
Kojto 93:e188a91d3eaa 602 */
Kojto 93:e188a91d3eaa 603 __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr)
Kojto 93:e188a91d3eaa 604 {
Kojto 93:e188a91d3eaa 605 uint32_t result;
Kojto 93:e188a91d3eaa 606
Kojto 93:e188a91d3eaa 607 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
Kojto 93:e188a91d3eaa 608 return(result);
Kojto 93:e188a91d3eaa 609 }
Kojto 93:e188a91d3eaa 610
Kojto 93:e188a91d3eaa 611
Kojto 93:e188a91d3eaa 612 /** \brief Remove the exclusive lock
Kojto 93:e188a91d3eaa 613
Kojto 93:e188a91d3eaa 614 This function removes the exclusive lock which is created by LDREX.
Kojto 93:e188a91d3eaa 615
Kojto 93:e188a91d3eaa 616 */
Kojto 93:e188a91d3eaa 617 __attribute__( ( always_inline ) ) __STATIC_INLINE void __CLREX(void)
Kojto 93:e188a91d3eaa 618 {
Kojto 93:e188a91d3eaa 619 __ASM volatile ("clrex" ::: "memory");
Kojto 93:e188a91d3eaa 620 }
Kojto 93:e188a91d3eaa 621
Kojto 93:e188a91d3eaa 622
Kojto 93:e188a91d3eaa 623 /** \brief Signed Saturate
Kojto 93:e188a91d3eaa 624
Kojto 93:e188a91d3eaa 625 This function saturates a signed value.
Kojto 93:e188a91d3eaa 626
Kojto 93:e188a91d3eaa 627 \param [in] value Value to be saturated
Kojto 93:e188a91d3eaa 628 \param [in] sat Bit position to saturate to (1..32)
Kojto 93:e188a91d3eaa 629 \return Saturated value
Kojto 93:e188a91d3eaa 630 */
Kojto 93:e188a91d3eaa 631 #define __SSAT(ARG1,ARG2) \
Kojto 93:e188a91d3eaa 632 ({ \
Kojto 93:e188a91d3eaa 633 uint32_t __RES, __ARG1 = (ARG1); \
Kojto 93:e188a91d3eaa 634 __ASM ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
Kojto 93:e188a91d3eaa 635 __RES; \
Kojto 93:e188a91d3eaa 636 })
Kojto 93:e188a91d3eaa 637
Kojto 93:e188a91d3eaa 638
Kojto 93:e188a91d3eaa 639 /** \brief Unsigned Saturate
Kojto 93:e188a91d3eaa 640
Kojto 93:e188a91d3eaa 641 This function saturates an unsigned value.
Kojto 93:e188a91d3eaa 642
Kojto 93:e188a91d3eaa 643 \param [in] value Value to be saturated
Kojto 93:e188a91d3eaa 644 \param [in] sat Bit position to saturate to (0..31)
Kojto 93:e188a91d3eaa 645 \return Saturated value
Kojto 93:e188a91d3eaa 646 */
Kojto 93:e188a91d3eaa 647 #define __USAT(ARG1,ARG2) \
Kojto 93:e188a91d3eaa 648 ({ \
Kojto 93:e188a91d3eaa 649 uint32_t __RES, __ARG1 = (ARG1); \
Kojto 93:e188a91d3eaa 650 __ASM ("usat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
Kojto 93:e188a91d3eaa 651 __RES; \
Kojto 93:e188a91d3eaa 652 })
Kojto 93:e188a91d3eaa 653
Kojto 93:e188a91d3eaa 654
Kojto 93:e188a91d3eaa 655 /** \brief Count leading zeros
Kojto 93:e188a91d3eaa 656
Kojto 93:e188a91d3eaa 657 This function counts the number of leading zeros of a data value.
Kojto 93:e188a91d3eaa 658
Kojto 93:e188a91d3eaa 659 \param [in] value Value to count the leading zeros
Kojto 93:e188a91d3eaa 660 \return number of leading zeros in value
Kojto 93:e188a91d3eaa 661 */
Kojto 93:e188a91d3eaa 662 __attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __CLZ(uint32_t value)
Kojto 93:e188a91d3eaa 663 {
Kojto 93:e188a91d3eaa 664 uint32_t result;
Kojto 93:e188a91d3eaa 665
Kojto 93:e188a91d3eaa 666 __ASM volatile ("clz %0, %1" : "=r" (result) : "r" (value) );
Kojto 93:e188a91d3eaa 667 return(result);
Kojto 93:e188a91d3eaa 668 }
Kojto 93:e188a91d3eaa 669
Kojto 93:e188a91d3eaa 670 #endif /* (__CORTEX_M >= 0x03) */
Kojto 93:e188a91d3eaa 671
Kojto 93:e188a91d3eaa 672
Kojto 93:e188a91d3eaa 673
Kojto 93:e188a91d3eaa 674
Kojto 93:e188a91d3eaa 675 #elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
Kojto 93:e188a91d3eaa 676 /* TASKING carm specific functions */
Kojto 93:e188a91d3eaa 677
Kojto 93:e188a91d3eaa 678 /*
Kojto 93:e188a91d3eaa 679 * The CMSIS functions have been implemented as intrinsics in the compiler.
Kojto 93:e188a91d3eaa 680 * Please use "carm -?i" to get an up to date list of all intrinsics,
Kojto 93:e188a91d3eaa 681 * Including the CMSIS ones.
Kojto 93:e188a91d3eaa 682 */
Kojto 93:e188a91d3eaa 683
Kojto 93:e188a91d3eaa 684 #endif
Kojto 93:e188a91d3eaa 685
Kojto 93:e188a91d3eaa 686 /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
Kojto 93:e188a91d3eaa 687
Kojto 93:e188a91d3eaa 688 #endif /* __CORE_CMINSTR_H */