Skip to content

Commit

Permalink
cpu/stm32f4: use common STM32 files
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Feb 10, 2016
1 parent 14a4ed6 commit c482bfb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cpu/stm32f4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions cpu/stm32f4/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export CPU_ARCH = cortex-m4f
export CPU_FAM = stm32f4

# use common periph functions
USEMODULE += periph_common

include $(RIOTCPU)/stm32_common/Makefile.include
include $(RIOTCPU)/Makefile.include.cortexm_common
12 changes: 2 additions & 10 deletions cpu/stm32f4/include/periph_cpu.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,6 +20,7 @@
#define PERIPH_CPU_H

#include "cpu.h"
#include "periph_cpu_common.h"

#ifdef __cplusplus
extern "C" {
Expand All @@ -43,15 +44,6 @@ typedef uint32_t gpio_t;
*/
#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 10)) | y)

/**
* @brief declare needed generic SPI functions
* @{
*/
#define PERIPH_SPI_NEEDS_TRANSFER_BYTES
#define PERIPH_SPI_NEEDS_TRANSFER_REG
#define PERIPH_SPI_NEEDS_TRANSFER_REGS
/** @} */

/**
* @brief Length of the CPU_ID in octets
*/
Expand Down

0 comments on commit c482bfb

Please sign in to comment.