stm32: Add support for FDCAN peripheral, exposed as pyb.CAN.
The new fdcan.c file provides the low-level C interface to the FDCAN peripheral, and pyb_can.c is updated to support both traditional CAN and FDCAN, depending on the MCU being compiled for.
This commit is contained in:
committed by
Damien George
parent
d06fd384c2
commit
f7a07b3605
@@ -275,6 +275,9 @@
|
||||
// Enable CAN if there are any peripherals defined
|
||||
#if defined(MICROPY_HW_CAN1_TX) || defined(MICROPY_HW_CAN2_TX) || defined(MICROPY_HW_CAN3_TX)
|
||||
#define MICROPY_HW_ENABLE_CAN (1)
|
||||
#if defined(STM32H7)
|
||||
#define MICROPY_HW_ENABLE_FDCAN (1) // define for MCUs with FDCAN
|
||||
#endif
|
||||
#else
|
||||
#define MICROPY_HW_ENABLE_CAN (0)
|
||||
#define MICROPY_HW_MAX_CAN (0)
|
||||
|
||||
Reference in New Issue
Block a user