Skip to content

Commit f88bd72

Browse files
committed
[Nuvoton] Force enum PinName to 32-bit
NU_PINNAME_BIND(...) requires enum PinName to be 32-bit to encode module binding information in it.
1 parent 1bf6d89 commit f88bd72

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

targets/TARGET_NUVOTON/TARGET_M2351/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ typedef enum {
173173
BUTTON1 = SW2,
174174
BUTTON2 = SW3,
175175

176+
// Force PinName to 32-bit required by NU_PINNAME_BIND(...)
177+
FORCE_ENUM_PINNAME_32BIT = 0x7FFFFFFF,
178+
176179
} PinName;
177180

178181
#ifdef __cplusplus

targets/TARGET_NUVOTON/TARGET_M451/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ typedef enum {
134134
BUTTON1 = SW2,
135135
BUTTON2 = SW3,
136136

137+
// Force PinName to 32-bit required by NU_PINNAME_BIND(...)
138+
FORCE_ENUM_PINNAME_32BIT = 0x7FFFFFFF,
139+
137140
} PinName;
138141

139142
#ifdef __cplusplus

targets/TARGET_NUVOTON/TARGET_M480/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ typedef enum {
139139
BUTTON1 = SW2,
140140
BUTTON2 = SW3,
141141

142+
// Force PinName to 32-bit required by NU_PINNAME_BIND(...)
143+
FORCE_ENUM_PINNAME_32BIT = 0x7FFFFFFF,
144+
142145
} PinName;
143146

144147
#ifdef __cplusplus

targets/TARGET_NUVOTON/TARGET_NANO100/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ typedef enum {
131131
BUTTON1 = SW1,
132132
BUTTON2 = SW2,
133133

134+
// Force PinName to 32-bit required by NU_PINNAME_BIND(...)
135+
FORCE_ENUM_PINNAME_32BIT = 0x7FFFFFFF,
136+
134137
} PinName;
135138

136139
#ifdef __cplusplus

targets/TARGET_NUVOTON/TARGET_NUC472/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ typedef enum {
137137
BUTTON1 = SW1,
138138
BUTTON2 = SW2,
139139

140+
// Force PinName to 32-bit required by NU_PINNAME_BIND(...)
141+
FORCE_ENUM_PINNAME_32BIT = 0x7FFFFFFF,
142+
140143
} PinName;
141144

142145
#ifdef __cplusplus

0 commit comments

Comments
 (0)