Skip to content

Commit 92e518e

Browse files
ThadHousecfriedt
authored andcommitted
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 <[email protected]>
1 parent e9a5951 commit 92e518e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/hal_rpi_pico/pico/config_autogen.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
* BUILD_ASSERT is included through toolchain.h.
2323
*/
2424
#include <zephyr/toolchain.h>
25+
#if !defined(__cplusplus) && !defined(static_assert)
2526
#define static_assert(expr, msg...) BUILD_ASSERT((expr), "" msg)
27+
#endif /* static_assert && __cplusplus__ */
2628

2729
/* Convert uses of asm, which is not supported in c99, to __asm */
2830
#define asm __asm

0 commit comments

Comments
 (0)