From 83125e9199ea5426a622a6a986856b103711f476 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Wed, 30 Oct 2019 17:08:34 +0800 Subject: [PATCH] HAL_ChibiOS: fix writing into a NULL pointer CANFD interrupt --- libraries/AP_HAL_ChibiOS/CANFDIface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp index 0081181189..00a2c58b5f 100644 --- a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp @@ -86,9 +86,9 @@ inline void handleInterrupt(uavcan::uint8_t iface_index, uavcan::uint8_t line_in UAVCAN_ASSERT(iface_index < UAVCAN_STM32_NUM_IFACES); if (ifaces[iface_index] == UAVCAN_NULLPTR) { //Just reset all the interrupts and return - ifaces[iface_index]->can_reg()->IR = FDCAN_IR_RF0N; - ifaces[iface_index]->can_reg()->IR = FDCAN_IR_RF1N; - ifaces[iface_index]->can_reg()->IR = FDCAN_IR_TEFN; + fdcan::Can[iface_index]->IR = FDCAN_IR_RF0N; + fdcan::Can[iface_index]->IR = FDCAN_IR_RF1N; + fdcan::Can[iface_index]->IR = FDCAN_IR_TEFN; UAVCAN_ASSERT(0); return; }