diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index a9560e014f..d98c36f27d 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -282,6 +282,10 @@ // plus one static notch with one harmonic #define HAL_HNF_MAX_FILTERS 18 #endif +#endif // HAL_HNF_MAX_FILTERS + +#ifndef HAL_CANFD_SUPPORTED +#define HAL_CANFD_SUPPORTED 0 #endif #ifndef __RAMFUNC__ diff --git a/libraries/AP_HAL/board/chibios.h b/libraries/AP_HAL/board/chibios.h index fa3e48511e..34b5726af2 100644 --- a/libraries/AP_HAL/board/chibios.h +++ b/libraries/AP_HAL/board/chibios.h @@ -128,3 +128,9 @@ #ifndef HAL_BOARD_STORAGE_DIRECTORY #define HAL_BOARD_STORAGE_DIRECTORY "/APM" #endif + +#if defined(STM32H7XX) || defined(STM32G4) +#define HAL_CANFD_SUPPORTED 1 +# else +#define HAL_CANFD_SUPPORTED 0 +#endif