rpi_pico: add support for Pi Pico and C11
Currently if C11 or higher is enabled, many files fail to compile because static_assert is defined in multiple header files. Solve this by disabling the one in the HAL if the other macro is found Signed-off-by: Thad House <thadhouse1@gmail.com>
This commit is contained in:
parent
e9a59518fc
commit
92e518ed5c
|
@ -22,7 +22,9 @@
|
||||||
* BUILD_ASSERT is included through toolchain.h.
|
* BUILD_ASSERT is included through toolchain.h.
|
||||||
*/
|
*/
|
||||||
#include <zephyr/toolchain.h>
|
#include <zephyr/toolchain.h>
|
||||||
|
#if !defined(__cplusplus) && !defined(static_assert)
|
||||||
#define static_assert(expr, msg...) BUILD_ASSERT((expr), "" msg)
|
#define static_assert(expr, msg...) BUILD_ASSERT((expr), "" msg)
|
||||||
|
#endif /* static_assert && __cplusplus__ */
|
||||||
|
|
||||||
/* Convert uses of asm, which is not supported in c99, to __asm */
|
/* Convert uses of asm, which is not supported in c99, to __asm */
|
||||||
#define asm __asm
|
#define asm __asm
|
||||||
|
|
Loading…
Reference in a new issue