Remove explicit include of rcc.h and allow common file to steer the right file

Clean up DFU files with MCU explicit includes
This commit is contained in:
Sid Price 2020-01-13 15:58:25 -07:00 committed by UweBonnes
parent 2137e775a4
commit 1a1cabc90b
5 changed files with 7 additions and 10 deletions

View File

@ -19,7 +19,7 @@
#include "general.h"
#include "usbdfu.h"
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/cm3/scb.h>
#define FLASH_OBP_RDP 0x1FFFF800

View File

@ -19,11 +19,8 @@
#include "general.h"
#include "usbdfu.h"
#if defined(STM32F2)
# include <libopencm3/stm32/f2/flash.h>
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/flash.h>
#endif
#include <libopencm3/stm32/flash.h>
#include <libopencm3/cm3/scb.h>
static uint32_t sector_addr[] = {

View File

@ -21,13 +21,13 @@
#include <string.h>
#if defined(STM32F1)
# include <libopencm3/stm32/f1/flash.h>
# define DFU_IFACE_STRING "@Internal Flash /0x08000000/8*001Ka,000*001Kg"
# define DFU_IFACE_STRING_OFFSET 38
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/flash.h>
# define DFU_IFACE_STRING "/0x08000000/1*016Ka,3*016Kg,1*064Kg,7*128Kg"
#endif
#include <libopencm3/stm32/flash.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>

View File

@ -37,7 +37,7 @@
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/rcc.h>
void traceswo_init(void)
{

View File

@ -35,7 +35,7 @@
#include <libopencmsis/core_cm3.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/dma.h>