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:
iabdalkader
2019-09-16 01:56:38 +02:00
committed by Damien George
parent d06fd384c2
commit f7a07b3605
7 changed files with 604 additions and 52 deletions

View File

@@ -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),