2021-11-30 05:51:48 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Yonatan Schachter
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Originally this file is generated by pico-sdk, and some files
|
|
|
|
* try to include it. Therefore, we have to provide that file,
|
|
|
|
* with this exact name.
|
|
|
|
* Since this file ends up included in all pico-sdk code, it's
|
|
|
|
* used to inject workarounds to make pico-sdk compile with Zephyr.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CONFIG_AUTOGEN_H_
|
|
|
|
#define _CONFIG_AUTOGEN_H_
|
|
|
|
|
|
|
|
/* WORKAROUNDS */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* static_assert is not supported, so BUILD_ASSERT is used instead.
|
|
|
|
* BUILD_ASSERT is included through toolchain.h.
|
|
|
|
*/
|
2022-05-06 17:09:00 +08:00
|
|
|
#include <zephyr/toolchain.h>
|
2022-09-14 08:03:55 +08:00
|
|
|
#if !defined(__cplusplus) && !defined(static_assert)
|
2021-11-30 05:51:48 +08:00
|
|
|
#define static_assert(expr, msg...) BUILD_ASSERT((expr), "" msg)
|
2022-09-14 08:03:55 +08:00
|
|
|
#endif /* static_assert && __cplusplus__ */
|
2021-11-30 05:51:48 +08:00
|
|
|
|
|
|
|
/* Convert uses of asm, which is not supported in c99, to __asm */
|
|
|
|
#define asm __asm
|
|
|
|
|
|
|
|
/* Disable binary info */
|
|
|
|
#define PICO_NO_BINARY_INFO 1
|
|
|
|
|
|
|
|
/* Zephyr compatible way of forcing inline */
|
|
|
|
#ifndef __always_inline
|
|
|
|
#define __always_inline ALWAYS_INLINE
|
|
|
|
#endif /* __always_inline */
|
|
|
|
|
2022-02-08 03:31:06 +08:00
|
|
|
/* Two definitions required for the flash driver */
|
|
|
|
#define __STRING(x) #x
|
|
|
|
|
|
|
|
#ifndef __noinline
|
|
|
|
#define __noinline __attribute__((noinline))
|
|
|
|
#endif
|
|
|
|
|
2021-11-30 05:51:48 +08:00
|
|
|
#endif
|