1 /* 2 * Copyright (c) 2021, Yonatan Schachter 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* 8 * Originally this file is generated by pico-sdk, and some files 9 * try to include it. Therefore, we have to provide that file, 10 * with this exact name. 11 * Since this file ends up included in all pico-sdk code, it's 12 * used to inject workarounds to make pico-sdk compile with Zephyr. 13 */ 14 15 #ifndef _CONFIG_AUTOGEN_H_ 16 #define _CONFIG_AUTOGEN_H_ 17 18 /* WORKAROUNDS */ 19 20 /* 21 * static_assert is not supported, so BUILD_ASSERT is used instead. 22 * BUILD_ASSERT is included through toolchain.h. 23 */ 24 #include <zephyr/toolchain.h> 25 #if !defined(__cplusplus) && !defined(static_assert) 26 #define static_assert(expr, msg...) BUILD_ASSERT((expr), "" msg) 27 #endif /* static_assert && __cplusplus__ */ 28 29 /* Convert uses of asm, which is not supported in c99, to __asm */ 30 #define asm __asm 31 32 /* Disable binary info */ 33 #define PICO_NO_BINARY_INFO 1 34 35 /* Zephyr compatible way of forcing inline */ 36 #ifndef __always_inline 37 #define __always_inline ALWAYS_INLINE 38 #endif /* __always_inline */ 39 40 /* Two definitions required for the flash driver */ 41 #define __STRING(x) #x 42 43 #ifndef __noinline 44 #define __noinline __attribute__((noinline)) 45 #endif 46 47 #endif 48