From 7a7ccd7743e132e62a29504ecd860e591a1f59d5 Mon Sep 17 00:00:00 2001 From: Laurent MEUNIER Date: Mon, 21 Aug 2017 14:41:08 +0200 Subject: [PATCH] STM32: F2: put can_s struct under DEVICE_CAN option In case of F2 devices without CAN support. --- targets/TARGET_STM/TARGET_STM32F2/objects.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/TARGET_STM/TARGET_STM32F2/objects.h b/targets/TARGET_STM/TARGET_STM32F2/objects.h index adad4a21ec..e87ecf78a7 100644 --- a/targets/TARGET_STM/TARGET_STM32F2/objects.h +++ b/targets/TARGET_STM/TARGET_STM32F2/objects.h @@ -136,11 +136,13 @@ struct pwmout_s { uint8_t inverted; }; +#ifdef DEVICE_CAN struct can_s { CAN_HandleTypeDef CanHandle; int index; int hz; }; +#endif #define GPIO_IP_WITHOUT_BRR #include "gpio_object.h"