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
@@ -114,6 +114,14 @@ enum {
|
||||
#define I2S2 SPI2
|
||||
#define I2S3 SPI3
|
||||
|
||||
#if defined(STM32H7)
|
||||
// Make H7 FDCAN more like CAN
|
||||
#define CAN1 FDCAN1
|
||||
#define CAN2 FDCAN2
|
||||
#define GPIO_AF9_CAN1 GPIO_AF9_FDCAN1
|
||||
#define GPIO_AF9_CAN2 GPIO_AF9_FDCAN2
|
||||
#endif
|
||||
|
||||
enum {
|
||||
PIN_ADC1 = (1 << 0),
|
||||
PIN_ADC2 = (1 << 1),
|
||||
|
||||
Reference in New Issue
Block a user