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:
Thad House 2022-09-13 17:03:55 -07:00 committed by Christopher Friedt
parent e9a59518fc
commit 92e518ed5c
1 changed files with 2 additions and 0 deletions

View File

@ -22,7 +22,9 @@
* BUILD_ASSERT is included through toolchain.h.
*/
#include <zephyr/toolchain.h>
#if !defined(__cplusplus) && !defined(static_assert)
#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 */
#define asm __asm