The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
158:1c57384330a6
Parent:
156:ff21514d8981
Child:
160:5571c4ff569f
--- a/TARGET_MTS_MDOT_F411RE/TARGET_STM/TARGET_STM32F4/can_device.h	Thu Nov 09 11:14:10 2017 +0000
+++ b/TARGET_MTS_MDOT_F411RE/TARGET_STM/TARGET_STM32F4/can_device.h	Thu Nov 23 11:44:04 2017 +0000
@@ -17,7 +17,7 @@
 #define MBED_CAN_DEVICE_H
 
 #include "cmsis.h"
-#include "stm32f4xx_hal.h"
+#include "stm32f4xx.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -25,7 +25,26 @@
 
 #ifdef DEVICE_CAN
 
-#define CAN_NUM 2 // Number of CAN peripherals present in the STM32 serie (1 or 2)
+#if defined(CAN3_BASE) && defined(CAN_3)
+
+#define CAN_NUM 3 // Number of CAN peripherals present in the STM32 serie
+
+#define CAN3_IRQ_RX_IRQN        CAN3_RX0_IRQn
+#define CAN3_IRQ_RX_VECT        CAN3_RX0_IRQHandler
+#define CAN3_IRQ_TX_IRQN        CAN3_TX_IRQn
+#define CAN3_IRQ_TX_VECT        CAN3_TX_IRQHandler
+#define CAN3_IRQ_ERROR_IRQN     CAN3_SCE_IRQn
+#define CAN3_IRQ_ERROR_VECT     CAN3_SCE_IRQHandler
+#define CAN3_IRQ_PASSIVE_IRQN   CAN3_SCE_IRQn
+#define CAN3_IRQ_PASSIVE_VECT   CAN3_SCE_IRQHandler
+#define CAN3_IRQ_BUS_IRQN       CAN3_SCE_IRQn
+#define CAN3_IRQ_BUS_VECT       CAN3_SCE_IRQHandler
+
+#else
+
+#define CAN_NUM 2 // Number of CAN peripherals present in the STM32 serie
+
+#endif
 
 #define CAN1_IRQ_RX_IRQN        CAN1_RX0_IRQn
 #define CAN1_IRQ_RX_VECT        CAN1_RX0_IRQHandler