Fix crash when using FDCAN3 RX IRQ on STM32G473 (and others)

pull/15447/head
Joseph Duchesne 2023-08-14 11:07:23 -04:00 committed by GitHub
parent 13f43cce52
commit 02b573793a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -24,7 +24,13 @@
#include "PeripheralPins.h"
#include "mbed_error.h"
// Some STM32G4 series (and others) have 3 FDCAN devices
// while others have 2
#ifdef FDCAN3
static uintptr_t can_irq_contexts[3] = {0};
#else
static uintptr_t can_irq_contexts[2] = {0};
#endif
static can_irq_handler irq_handler;
/** Call all the init functions