inport from local

Dependents:   Hobbyking_Cheetah_0511

Committer:
NYX
Date:
Mon Mar 16 06:35:48 2020 +0000
Revision:
0:85b3fd62ea1a
reinport to mbed;

Who changed what in which revision?

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