summaryrefslogtreecommitdiffstatshomepage
path: root/ports/stm32/mpconfigboard_common.h
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2019-09-16 01:56:38 +0200
committerDamien George <damien.p.george@gmail.com>2019-09-23 17:00:54 +1000
commitf7a07b36057d61264958e3577f7e4555e77d520c (patch)
treecdc7cdd14f97fe54d33552e539cafc0f4d992444 /ports/stm32/mpconfigboard_common.h
parentd06fd384c2c26c18ffbcbb83f64548ec19875012 (diff)
downloadmicropython-f7a07b36057d61264958e3577f7e4555e77d520c.tar.gz
micropython-f7a07b36057d61264958e3577f7e4555e77d520c.zip
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.
Diffstat (limited to 'ports/stm32/mpconfigboard_common.h')
-rw-r--r--ports/stm32/mpconfigboard_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h
index d353468f96..e0c77719e3 100644
--- a/ports/stm32/mpconfigboard_common.h
+++ b/ports/stm32/mpconfigboard_common.h
@@ -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)