From bab0c1dfc7a6377a48cb7dc9b43932708f8d2426 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 31 Jul 2021 14:57:29 +1000 Subject: [PATCH] HAL_ChibiOS: fixed build for single FDCAN G4 boards --- libraries/AP_HAL_ChibiOS/CANFDIface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp index 9a1a29c6e7..2fc4a1b4f8 100644 --- a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp @@ -574,10 +574,12 @@ bool CANIface::init(const uint32_t bitrate, const OperatingMode mode) nvicEnableVector(FDCAN1_IT0_IRQn, CORTEX_MAX_KERNEL_PRIORITY); nvicEnableVector(FDCAN1_IT1_IRQn, CORTEX_MAX_KERNEL_PRIORITY); break; +#ifdef FDCAN2_IT0_IRQn case 1: nvicEnableVector(FDCAN2_IT0_IRQn, CORTEX_MAX_KERNEL_PRIORITY); nvicEnableVector(FDCAN2_IT1_IRQn, CORTEX_MAX_KERNEL_PRIORITY); break; +#endif #ifdef FDCAN3_IT0_IRQn case 2: nvicEnableVector(FDCAN3_IT0_IRQn, CORTEX_MAX_KERNEL_PRIORITY);