summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cortex-m/irq_handler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/cortex-m/irq_handler.h b/core/cortex-m/irq_handler.h
index 0d659b0610..c309b48102 100644
--- a/core/cortex-m/irq_handler.h
+++ b/core/cortex-m/irq_handler.h
@@ -24,6 +24,9 @@
#define DECLARE_IRQ(irq, routine, priority) DECLARE_IRQ_(irq, routine, priority)
#define DECLARE_IRQ_(irq, routine, priority) \
void IRQ_HANDLER(irq)(void) __attribute__((naked)); \
+ typedef struct { \
+ int dummy[irq >= CONFIG_IRQ_COUNT ? -1 : 1]; \
+ } irq_num_check_##irq; \
void __keep routine(void); \
void IRQ_HANDLER(irq)(void) \
{ \