1 /* 2 * Copyright (c) 2018, ST Microelectronics. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /* 8 * @file iar/compiler.h 9 * @brief IAR specific primitives for libmetal. 10 */ 11 12 #ifndef __METAL_IAR_COMPILER__H__ 13 #define __METAL_IAR_COMPILER__H__ 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 #define restrict __restrict__ 20 #define metal_align(n) __attribute__((aligned(n))) 21 #define metal_weak __attribute__((weak)) 22 #define metal_asm asm 23 24 #define METAL_PACKED_BEGIN __packed 25 #define METAL_PACKED_END 26 27 #ifndef __deprecated 28 #define __deprecated __attribute__((deprecated)) 29 #endif 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif /* __METAL_IAR_COMPILER__H__ */ 36