From 1a1cabc90b29d93495d2db2d413ac4c98335cc17 Mon Sep 17 00:00:00 2001 From: Sid Price Date: Mon, 13 Jan 2020 15:58:25 -0700 Subject: [PATCH] Remove explicit include of rcc.h and allow common file to steer the right file Clean up DFU files with MCU explicit includes --- src/platforms/stm32/dfu_f1.c | 2 +- src/platforms/stm32/dfu_f4.c | 7 ++----- src/platforms/stm32/dfucore.c | 4 ++-- src/platforms/stm32/traceswo.c | 2 +- src/platforms/stm32/traceswoasync.c | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/platforms/stm32/dfu_f1.c b/src/platforms/stm32/dfu_f1.c index 83e95ec1..b4b92089 100644 --- a/src/platforms/stm32/dfu_f1.c +++ b/src/platforms/stm32/dfu_f1.c @@ -19,7 +19,7 @@ #include "general.h" #include "usbdfu.h" -#include +#include #include #define FLASH_OBP_RDP 0x1FFFF800 diff --git a/src/platforms/stm32/dfu_f4.c b/src/platforms/stm32/dfu_f4.c index 2ececa00..0e3f9354 100644 --- a/src/platforms/stm32/dfu_f4.c +++ b/src/platforms/stm32/dfu_f4.c @@ -19,11 +19,8 @@ #include "general.h" #include "usbdfu.h" -#if defined(STM32F2) -# include -#elif defined(STM32F4) -# include -#endif +#include + #include static uint32_t sector_addr[] = { diff --git a/src/platforms/stm32/dfucore.c b/src/platforms/stm32/dfucore.c index adeff9ae..5931d1d9 100644 --- a/src/platforms/stm32/dfucore.c +++ b/src/platforms/stm32/dfucore.c @@ -21,13 +21,13 @@ #include #if defined(STM32F1) -# include # define DFU_IFACE_STRING "@Internal Flash /0x08000000/8*001Ka,000*001Kg" # define DFU_IFACE_STRING_OFFSET 38 #elif defined(STM32F4) -# include # define DFU_IFACE_STRING "/0x08000000/1*016Ka,3*016Kg,1*064Kg,7*128Kg" #endif +#include + #include #include diff --git a/src/platforms/stm32/traceswo.c b/src/platforms/stm32/traceswo.c index 392de224..7af7ef35 100644 --- a/src/platforms/stm32/traceswo.c +++ b/src/platforms/stm32/traceswo.c @@ -37,7 +37,7 @@ #include #include -#include +#include void traceswo_init(void) { diff --git a/src/platforms/stm32/traceswoasync.c b/src/platforms/stm32/traceswoasync.c index 98cf45db..94b07c34 100644 --- a/src/platforms/stm32/traceswoasync.c +++ b/src/platforms/stm32/traceswoasync.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include