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

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

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

Committer:
AnnaBridge
Date:
Thu Jul 06 15:30:22 2017 +0100
Revision:
146:22da6e220af6
Child:
152:235179ab3f27
Release 146 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 146:22da6e220af6 1 /**************************************************************************//**
AnnaBridge 146:22da6e220af6 2 * @file cmsis_compiler.h
AnnaBridge 146:22da6e220af6 3 * @brief CMSIS compiler generic header file
AnnaBridge 146:22da6e220af6 4 * @version V5.0.2
AnnaBridge 146:22da6e220af6 5 * @date 13. February 2017
AnnaBridge 146:22da6e220af6 6 ******************************************************************************/
AnnaBridge 146:22da6e220af6 7 /*
AnnaBridge 146:22da6e220af6 8 * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
AnnaBridge 146:22da6e220af6 9 *
AnnaBridge 146:22da6e220af6 10 * SPDX-License-Identifier: Apache-2.0
AnnaBridge 146:22da6e220af6 11 *
AnnaBridge 146:22da6e220af6 12 * Licensed under the Apache License, Version 2.0 (the License); you may
AnnaBridge 146:22da6e220af6 13 * not use this file except in compliance with the License.
AnnaBridge 146:22da6e220af6 14 * You may obtain a copy of the License at
AnnaBridge 146:22da6e220af6 15 *
AnnaBridge 146:22da6e220af6 16 * www.apache.org/licenses/LICENSE-2.0
AnnaBridge 146:22da6e220af6 17 *
AnnaBridge 146:22da6e220af6 18 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 146:22da6e220af6 19 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
AnnaBridge 146:22da6e220af6 20 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 146:22da6e220af6 21 * See the License for the specific language governing permissions and
AnnaBridge 146:22da6e220af6 22 * limitations under the License.
AnnaBridge 146:22da6e220af6 23 */
AnnaBridge 146:22da6e220af6 24
AnnaBridge 146:22da6e220af6 25 #ifndef __CMSIS_COMPILER_H
AnnaBridge 146:22da6e220af6 26 #define __CMSIS_COMPILER_H
AnnaBridge 146:22da6e220af6 27
AnnaBridge 146:22da6e220af6 28 #include <stdint.h>
AnnaBridge 146:22da6e220af6 29
AnnaBridge 146:22da6e220af6 30 /*
AnnaBridge 146:22da6e220af6 31 * ARM Compiler 4/5
AnnaBridge 146:22da6e220af6 32 */
AnnaBridge 146:22da6e220af6 33 #if defined ( __CC_ARM )
AnnaBridge 146:22da6e220af6 34 #include "cmsis_armcc.h"
AnnaBridge 146:22da6e220af6 35
AnnaBridge 146:22da6e220af6 36
AnnaBridge 146:22da6e220af6 37 /*
AnnaBridge 146:22da6e220af6 38 * ARM Compiler 6 (armclang)
AnnaBridge 146:22da6e220af6 39 */
AnnaBridge 146:22da6e220af6 40 #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
AnnaBridge 146:22da6e220af6 41 #include "cmsis_armclang.h"
AnnaBridge 146:22da6e220af6 42
AnnaBridge 146:22da6e220af6 43
AnnaBridge 146:22da6e220af6 44 /*
AnnaBridge 146:22da6e220af6 45 * GNU Compiler
AnnaBridge 146:22da6e220af6 46 */
AnnaBridge 146:22da6e220af6 47 #elif defined ( __GNUC__ )
AnnaBridge 146:22da6e220af6 48 #include "cmsis_gcc.h"
AnnaBridge 146:22da6e220af6 49
AnnaBridge 146:22da6e220af6 50
AnnaBridge 146:22da6e220af6 51 /*
AnnaBridge 146:22da6e220af6 52 * IAR Compiler
AnnaBridge 146:22da6e220af6 53 */
AnnaBridge 146:22da6e220af6 54 #elif defined ( __ICCARM__ )
AnnaBridge 146:22da6e220af6 55
AnnaBridge 146:22da6e220af6 56 #ifndef __ASM
AnnaBridge 146:22da6e220af6 57 #define __ASM __asm
AnnaBridge 146:22da6e220af6 58 #endif
AnnaBridge 146:22da6e220af6 59 #ifndef __INLINE
AnnaBridge 146:22da6e220af6 60 #define __INLINE inline
AnnaBridge 146:22da6e220af6 61 #endif
AnnaBridge 146:22da6e220af6 62 #ifndef __STATIC_INLINE
AnnaBridge 146:22da6e220af6 63 #define __STATIC_INLINE static inline
AnnaBridge 146:22da6e220af6 64 #endif
AnnaBridge 146:22da6e220af6 65
AnnaBridge 146:22da6e220af6 66 #include <cmsis_iar.h>
AnnaBridge 146:22da6e220af6 67
AnnaBridge 146:22da6e220af6 68 /* CMSIS compiler control architecture macros */
AnnaBridge 146:22da6e220af6 69 #if (__CORE__ == __ARM6M__) || (__CORE__ == __ARM6SM__)
AnnaBridge 146:22da6e220af6 70 #ifndef __ARM_ARCH_6M__
AnnaBridge 146:22da6e220af6 71 #define __ARM_ARCH_6M__ 1
AnnaBridge 146:22da6e220af6 72 #endif
AnnaBridge 146:22da6e220af6 73 #elif (__CORE__ == __ARM7M__)
AnnaBridge 146:22da6e220af6 74 #ifndef __ARM_ARCH_7M__
AnnaBridge 146:22da6e220af6 75 #define __ARM_ARCH_7M__ 1
AnnaBridge 146:22da6e220af6 76 #endif
AnnaBridge 146:22da6e220af6 77 #elif (__CORE__ == __ARM7EM__)
AnnaBridge 146:22da6e220af6 78 #ifndef __ARM_ARCH_7EM__
AnnaBridge 146:22da6e220af6 79 #define __ARM_ARCH_7EM__ 1
AnnaBridge 146:22da6e220af6 80 #endif
AnnaBridge 146:22da6e220af6 81 #endif
AnnaBridge 146:22da6e220af6 82
AnnaBridge 146:22da6e220af6 83 // IAR version 7.8.1 and earlier do not include __ALIGNED
AnnaBridge 146:22da6e220af6 84 #ifndef __ALIGNED
AnnaBridge 146:22da6e220af6 85 #define __ALIGNED(x) __attribute__((aligned(x)))
AnnaBridge 146:22da6e220af6 86 #endif
AnnaBridge 146:22da6e220af6 87
AnnaBridge 146:22da6e220af6 88 #ifndef __NO_RETURN
AnnaBridge 146:22da6e220af6 89 #define __NO_RETURN __noreturn
AnnaBridge 146:22da6e220af6 90 #endif
AnnaBridge 146:22da6e220af6 91 #ifndef __USED
AnnaBridge 146:22da6e220af6 92 #define __USED __root
AnnaBridge 146:22da6e220af6 93 #endif
AnnaBridge 146:22da6e220af6 94 #ifndef __WEAK
AnnaBridge 146:22da6e220af6 95 #define __WEAK __weak
AnnaBridge 146:22da6e220af6 96 #endif
AnnaBridge 146:22da6e220af6 97 #ifndef __PACKED
AnnaBridge 146:22da6e220af6 98 #define __PACKED __packed
AnnaBridge 146:22da6e220af6 99 #endif
AnnaBridge 146:22da6e220af6 100 #ifndef __PACKED_STRUCT
AnnaBridge 146:22da6e220af6 101 #define __PACKED_STRUCT __packed struct
AnnaBridge 146:22da6e220af6 102 #endif
AnnaBridge 146:22da6e220af6 103 #ifndef __UNALIGNED_UINT32 /* deprecated */
AnnaBridge 146:22da6e220af6 104 __packed struct T_UINT32 { uint32_t v; };
AnnaBridge 146:22da6e220af6 105 #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
AnnaBridge 146:22da6e220af6 106 #endif
AnnaBridge 146:22da6e220af6 107 #ifndef __UNALIGNED_UINT16_WRITE
AnnaBridge 146:22da6e220af6 108 __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
AnnaBridge 146:22da6e220af6 109 #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 110 #endif
AnnaBridge 146:22da6e220af6 111 #ifndef __UNALIGNED_UINT16_READ
AnnaBridge 146:22da6e220af6 112 __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
AnnaBridge 146:22da6e220af6 113 #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 114 #endif
AnnaBridge 146:22da6e220af6 115 #ifndef __UNALIGNED_UINT32_WRITE
AnnaBridge 146:22da6e220af6 116 __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
AnnaBridge 146:22da6e220af6 117 #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 118 #endif
AnnaBridge 146:22da6e220af6 119 #ifndef __UNALIGNED_UINT32_READ
AnnaBridge 146:22da6e220af6 120 __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
AnnaBridge 146:22da6e220af6 121 #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 122 #endif
AnnaBridge 146:22da6e220af6 123 #ifndef __ALIGNED
AnnaBridge 146:22da6e220af6 124 #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
AnnaBridge 146:22da6e220af6 125 #define __ALIGNED(x)
AnnaBridge 146:22da6e220af6 126 #endif
AnnaBridge 146:22da6e220af6 127
AnnaBridge 146:22da6e220af6 128
AnnaBridge 146:22da6e220af6 129 /*
AnnaBridge 146:22da6e220af6 130 * TI ARM Compiler
AnnaBridge 146:22da6e220af6 131 */
AnnaBridge 146:22da6e220af6 132 #elif defined ( __TI_ARM__ )
AnnaBridge 146:22da6e220af6 133 #include <cmsis_ccs.h>
AnnaBridge 146:22da6e220af6 134
AnnaBridge 146:22da6e220af6 135 #ifndef __ASM
AnnaBridge 146:22da6e220af6 136 #define __ASM __asm
AnnaBridge 146:22da6e220af6 137 #endif
AnnaBridge 146:22da6e220af6 138 #ifndef __INLINE
AnnaBridge 146:22da6e220af6 139 #define __INLINE inline
AnnaBridge 146:22da6e220af6 140 #endif
AnnaBridge 146:22da6e220af6 141 #ifndef __STATIC_INLINE
AnnaBridge 146:22da6e220af6 142 #define __STATIC_INLINE static inline
AnnaBridge 146:22da6e220af6 143 #endif
AnnaBridge 146:22da6e220af6 144 #ifndef __NO_RETURN
AnnaBridge 146:22da6e220af6 145 #define __NO_RETURN __attribute__((noreturn))
AnnaBridge 146:22da6e220af6 146 #endif
AnnaBridge 146:22da6e220af6 147 #ifndef __USED
AnnaBridge 146:22da6e220af6 148 #define __USED __attribute__((used))
AnnaBridge 146:22da6e220af6 149 #endif
AnnaBridge 146:22da6e220af6 150 #ifndef __WEAK
AnnaBridge 146:22da6e220af6 151 #define __WEAK __attribute__((weak))
AnnaBridge 146:22da6e220af6 152 #endif
AnnaBridge 146:22da6e220af6 153 #ifndef __PACKED
AnnaBridge 146:22da6e220af6 154 #define __PACKED __attribute__((packed))
AnnaBridge 146:22da6e220af6 155 #endif
AnnaBridge 146:22da6e220af6 156 #ifndef __PACKED_STRUCT
AnnaBridge 146:22da6e220af6 157 #define __PACKED_STRUCT struct __attribute__((packed))
AnnaBridge 146:22da6e220af6 158 #endif
AnnaBridge 146:22da6e220af6 159 #ifndef __UNALIGNED_UINT32 /* deprecated */
AnnaBridge 146:22da6e220af6 160 struct __attribute__((packed)) T_UINT32 { uint32_t v; };
AnnaBridge 146:22da6e220af6 161 #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
AnnaBridge 146:22da6e220af6 162 #endif
AnnaBridge 146:22da6e220af6 163 #ifndef __UNALIGNED_UINT16_WRITE
AnnaBridge 146:22da6e220af6 164 __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
AnnaBridge 146:22da6e220af6 165 #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 166 #endif
AnnaBridge 146:22da6e220af6 167 #ifndef __UNALIGNED_UINT16_READ
AnnaBridge 146:22da6e220af6 168 __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
AnnaBridge 146:22da6e220af6 169 #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 170 #endif
AnnaBridge 146:22da6e220af6 171 #ifndef __UNALIGNED_UINT32_WRITE
AnnaBridge 146:22da6e220af6 172 __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
AnnaBridge 146:22da6e220af6 173 #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 174 #endif
AnnaBridge 146:22da6e220af6 175 #ifndef __UNALIGNED_UINT32_READ
AnnaBridge 146:22da6e220af6 176 __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
AnnaBridge 146:22da6e220af6 177 #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 178 #endif
AnnaBridge 146:22da6e220af6 179 #ifndef __ALIGNED
AnnaBridge 146:22da6e220af6 180 #define __ALIGNED(x) __attribute__((aligned(x)))
AnnaBridge 146:22da6e220af6 181 #endif
AnnaBridge 146:22da6e220af6 182
AnnaBridge 146:22da6e220af6 183
AnnaBridge 146:22da6e220af6 184 /*
AnnaBridge 146:22da6e220af6 185 * TASKING Compiler
AnnaBridge 146:22da6e220af6 186 */
AnnaBridge 146:22da6e220af6 187 #elif defined ( __TASKING__ )
AnnaBridge 146:22da6e220af6 188 /*
AnnaBridge 146:22da6e220af6 189 * The CMSIS functions have been implemented as intrinsics in the compiler.
AnnaBridge 146:22da6e220af6 190 * Please use "carm -?i" to get an up to date list of all intrinsics,
AnnaBridge 146:22da6e220af6 191 * Including the CMSIS ones.
AnnaBridge 146:22da6e220af6 192 */
AnnaBridge 146:22da6e220af6 193
AnnaBridge 146:22da6e220af6 194 #ifndef __ASM
AnnaBridge 146:22da6e220af6 195 #define __ASM __asm
AnnaBridge 146:22da6e220af6 196 #endif
AnnaBridge 146:22da6e220af6 197 #ifndef __INLINE
AnnaBridge 146:22da6e220af6 198 #define __INLINE inline
AnnaBridge 146:22da6e220af6 199 #endif
AnnaBridge 146:22da6e220af6 200 #ifndef __STATIC_INLINE
AnnaBridge 146:22da6e220af6 201 #define __STATIC_INLINE static inline
AnnaBridge 146:22da6e220af6 202 #endif
AnnaBridge 146:22da6e220af6 203 #ifndef __NO_RETURN
AnnaBridge 146:22da6e220af6 204 #define __NO_RETURN __attribute__((noreturn))
AnnaBridge 146:22da6e220af6 205 #endif
AnnaBridge 146:22da6e220af6 206 #ifndef __USED
AnnaBridge 146:22da6e220af6 207 #define __USED __attribute__((used))
AnnaBridge 146:22da6e220af6 208 #endif
AnnaBridge 146:22da6e220af6 209 #ifndef __WEAK
AnnaBridge 146:22da6e220af6 210 #define __WEAK __attribute__((weak))
AnnaBridge 146:22da6e220af6 211 #endif
AnnaBridge 146:22da6e220af6 212 #ifndef __PACKED
AnnaBridge 146:22da6e220af6 213 #define __PACKED __packed__
AnnaBridge 146:22da6e220af6 214 #endif
AnnaBridge 146:22da6e220af6 215 #ifndef __PACKED_STRUCT
AnnaBridge 146:22da6e220af6 216 #define __PACKED_STRUCT struct __packed__
AnnaBridge 146:22da6e220af6 217 #endif
AnnaBridge 146:22da6e220af6 218 #ifndef __UNALIGNED_UINT32 /* deprecated */
AnnaBridge 146:22da6e220af6 219 struct __packed__ T_UINT32 { uint32_t v; };
AnnaBridge 146:22da6e220af6 220 #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
AnnaBridge 146:22da6e220af6 221 #endif
AnnaBridge 146:22da6e220af6 222 #ifndef __UNALIGNED_UINT16_WRITE
AnnaBridge 146:22da6e220af6 223 __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
AnnaBridge 146:22da6e220af6 224 #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 225 #endif
AnnaBridge 146:22da6e220af6 226 #ifndef __UNALIGNED_UINT16_READ
AnnaBridge 146:22da6e220af6 227 __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
AnnaBridge 146:22da6e220af6 228 #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 229 #endif
AnnaBridge 146:22da6e220af6 230 #ifndef __UNALIGNED_UINT32_WRITE
AnnaBridge 146:22da6e220af6 231 __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
AnnaBridge 146:22da6e220af6 232 #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 233 #endif
AnnaBridge 146:22da6e220af6 234 #ifndef __UNALIGNED_UINT32_READ
AnnaBridge 146:22da6e220af6 235 __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
AnnaBridge 146:22da6e220af6 236 #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 237 #endif
AnnaBridge 146:22da6e220af6 238 #ifndef __ALIGNED
AnnaBridge 146:22da6e220af6 239 #define __ALIGNED(x) __align(x)
AnnaBridge 146:22da6e220af6 240 #endif
AnnaBridge 146:22da6e220af6 241
AnnaBridge 146:22da6e220af6 242
AnnaBridge 146:22da6e220af6 243 /*
AnnaBridge 146:22da6e220af6 244 * COSMIC Compiler
AnnaBridge 146:22da6e220af6 245 */
AnnaBridge 146:22da6e220af6 246 #elif defined ( __CSMC__ )
AnnaBridge 146:22da6e220af6 247 #include <cmsis_csm.h>
AnnaBridge 146:22da6e220af6 248
AnnaBridge 146:22da6e220af6 249 #ifndef __ASM
AnnaBridge 146:22da6e220af6 250 #define __ASM _asm
AnnaBridge 146:22da6e220af6 251 #endif
AnnaBridge 146:22da6e220af6 252 #ifndef __INLINE
AnnaBridge 146:22da6e220af6 253 #define __INLINE inline
AnnaBridge 146:22da6e220af6 254 #endif
AnnaBridge 146:22da6e220af6 255 #ifndef __STATIC_INLINE
AnnaBridge 146:22da6e220af6 256 #define __STATIC_INLINE static inline
AnnaBridge 146:22da6e220af6 257 #endif
AnnaBridge 146:22da6e220af6 258 #ifndef __NO_RETURN
AnnaBridge 146:22da6e220af6 259 // NO RETURN is automatically detected hence no warning here
AnnaBridge 146:22da6e220af6 260 #define __NO_RETURN
AnnaBridge 146:22da6e220af6 261 #endif
AnnaBridge 146:22da6e220af6 262 #ifndef __USED
AnnaBridge 146:22da6e220af6 263 #warning No compiler specific solution for __USED. __USED is ignored.
AnnaBridge 146:22da6e220af6 264 #define __USED
AnnaBridge 146:22da6e220af6 265 #endif
AnnaBridge 146:22da6e220af6 266 #ifndef __WEAK
AnnaBridge 146:22da6e220af6 267 #define __WEAK __weak
AnnaBridge 146:22da6e220af6 268 #endif
AnnaBridge 146:22da6e220af6 269 #ifndef __PACKED
AnnaBridge 146:22da6e220af6 270 #define __PACKED @packed
AnnaBridge 146:22da6e220af6 271 #endif
AnnaBridge 146:22da6e220af6 272 #ifndef __PACKED_STRUCT
AnnaBridge 146:22da6e220af6 273 #define __PACKED_STRUCT @packed struct
AnnaBridge 146:22da6e220af6 274 #endif
AnnaBridge 146:22da6e220af6 275 #ifndef __UNALIGNED_UINT32 /* deprecated */
AnnaBridge 146:22da6e220af6 276 @packed struct T_UINT32 { uint32_t v; };
AnnaBridge 146:22da6e220af6 277 #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
AnnaBridge 146:22da6e220af6 278 #endif
AnnaBridge 146:22da6e220af6 279 #ifndef __UNALIGNED_UINT16_WRITE
AnnaBridge 146:22da6e220af6 280 __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
AnnaBridge 146:22da6e220af6 281 #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 282 #endif
AnnaBridge 146:22da6e220af6 283 #ifndef __UNALIGNED_UINT16_READ
AnnaBridge 146:22da6e220af6 284 __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
AnnaBridge 146:22da6e220af6 285 #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 286 #endif
AnnaBridge 146:22da6e220af6 287 #ifndef __UNALIGNED_UINT32_WRITE
AnnaBridge 146:22da6e220af6 288 __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
AnnaBridge 146:22da6e220af6 289 #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
AnnaBridge 146:22da6e220af6 290 #endif
AnnaBridge 146:22da6e220af6 291 #ifndef __UNALIGNED_UINT32_READ
AnnaBridge 146:22da6e220af6 292 __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
AnnaBridge 146:22da6e220af6 293 #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
AnnaBridge 146:22da6e220af6 294 #endif
AnnaBridge 146:22da6e220af6 295 #ifndef __ALIGNED
AnnaBridge 146:22da6e220af6 296 #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
AnnaBridge 146:22da6e220af6 297 #define __ALIGNED(x)
AnnaBridge 146:22da6e220af6 298 #endif
AnnaBridge 146:22da6e220af6 299
AnnaBridge 146:22da6e220af6 300
AnnaBridge 146:22da6e220af6 301 #else
AnnaBridge 146:22da6e220af6 302 #error Unknown compiler.
AnnaBridge 146:22da6e220af6 303 #endif
AnnaBridge 146:22da6e220af6 304
AnnaBridge 146:22da6e220af6 305
AnnaBridge 146:22da6e220af6 306 #endif /* __CMSIS_COMPILER_H */
AnnaBridge 146:22da6e220af6 307