Skip to content

Commit fbd7c4e

Browse files
committed
Move _Static_assert to avoid build issue
When HAL does not include stdio.h Moreover it allows to group all _Static_assert Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent 31b844b commit fbd7c4e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cores/arduino/pins_arduino.h

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
// Include board variant
2121
#include "variant.h"
2222

23+
// Avoid PortName issue
24+
_Static_assert(LastPort <= 0x0F, "PortName must be less than 16");
25+
2326
// Avoid pins number misalignment
2427
_Static_assert(NUM_DIGITAL_PINS==PEND, "NUM_DIGITAL_PINS and PEND differ!");
2528

cores/arduino/stm32/PortNames.h

-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ typedef enum {
7171
LastPort = PortZ-1
7272
} PortName;
7373

74-
_Static_assert (LastPort <= 0x0F, "PortName must be less than 16");
75-
7674
#define MAX_NB_PORT (LastPort-FirstPort+1)
7775

7876
GPIO_TypeDef *get_GPIO_Port(uint32_t port_idx);

0 commit comments

Comments
 (0)