From 14a4ed69b65d2471acfceda8be39f6ee61e09b45 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Mon, 8 Feb 2016 21:51:15 +0100 Subject: [PATCH] cpu/stm32f3: use common STM32 files --- cpu/stm32f3/Makefile | 2 +- cpu/stm32f3/Makefile.include | 5 ++--- cpu/stm32f3/include/periph_cpu.h | 17 ++++------------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/cpu/stm32f3/Makefile b/cpu/stm32f3/Makefile index 21f0d18719..9836e38e6d 100644 --- a/cpu/stm32f3/Makefile +++ b/cpu/stm32f3/Makefile @@ -2,6 +2,6 @@ MODULE = cpu # add a list of subdirectories, that should also be build -DIRS = periph $(RIOTCPU)/cortexm_common +DIRS = periph $(RIOTCPU)/cortexm_common $(RIOTCPU)/stm32_common include $(RIOTBASE)/Makefile.base diff --git a/cpu/stm32f3/Makefile.include b/cpu/stm32f3/Makefile.include index a82d33be1a..b733349bee 100644 --- a/cpu/stm32f3/Makefile.include +++ b/cpu/stm32f3/Makefile.include @@ -1,6 +1,5 @@ export CPU_ARCH = cortex-m4f +export CPU_FAM = stm32f3 -# includ common periph module -USEMODULE += periph_common - +include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTCPU)/Makefile.include.cortexm_common diff --git a/cpu/stm32f3/include/periph_cpu.h b/cpu/stm32f3/include/periph_cpu.h index e1aecbf780..acb94896a8 100644 --- a/cpu/stm32f3/include/periph_cpu.h +++ b/cpu/stm32f3/include/periph_cpu.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Freie Universität Berlin + * Copyright (C) 2015-2016 Freie Universität Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -16,11 +16,11 @@ * @author Hauke Petersen */ -#ifndef PERIPH_CPU_H_ -#define PERIPH_CPU_H_ +#ifndef PERIPH_CPU_H +#define PERIPH_CPU_H #include "cpu.h" -#include "periph/dev_enums.h" +#include "periph_cpu_common.h" #ifdef __cplusplus extern "C" { @@ -84,15 +84,6 @@ typedef enum { GPIO_AF15 /**< use alternate function 14 */ } gpio_af_t; -/** - * @brief declare needed generic SPI functions - * @{ - */ -#define PERIPH_SPI_NEEDS_TRANSFER_BYTES -#define PERIPH_SPI_NEEDS_TRANSFER_REG -#define PERIPH_SPI_NEEDS_TRANSFER_REGS -/** @} */ - #ifdef __cplusplus } #endif