From cd5573c09def76d3d202349639da6ba05617b31b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sat, 19 Jun 2021 12:40:57 +0200 Subject: bsps/irq: Add BSP_INTERRUPT_VECTOR_COUNT Assert BSP_INTERRUPT_VECTOR_MAX + 1 == BSP_INTERRUPT_VECTOR_COUNT. After building all BSPs with this patch, BSP_INTERRUPT_VECTOR_MAX can be removed and replaced by BSP_INTERRUPT_VECTOR_COUNT. The BSP_INTERRUPT_VECTOR_COUNT allows a default implementation which supports no interrupt vector at all. Using COUNT instead of MAX may avoid some interpretation issues, for example is the maximum value a valid vector number or not. Update #3269. --- bsps/arm/imxrt/include/bsp/irq.h | 1 + 1 file changed, 1 insertion(+) (limited to 'bsps/arm/imxrt/include') diff --git a/bsps/arm/imxrt/include/bsp/irq.h b/bsps/arm/imxrt/include/bsp/irq.h index 5e7fba0d33..0732136570 100644 --- a/bsps/arm/imxrt/include/bsp/irq.h +++ b/bsps/arm/imxrt/include/bsp/irq.h @@ -44,6 +44,7 @@ extern "C" { #endif /* __cplusplus */ #define BSP_INTERRUPT_VECTOR_MAX 159 +#define BSP_INTERRUPT_VECTOR_COUNT 160 #define BSP_INTERRUPT_VECTOR_INVALID (UINT32_MAX) #ifdef __cplusplus -- cgit v1.2.3