Skip to content

Commit

Permalink
cpu: added place for shared STM32 files
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Feb 10, 2016
1 parent 436d8f6 commit f4587b3
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpu/stm32_common/Makefile
@@ -0,0 +1,3 @@
DIRS = periph

include $(RIOTBASE)/Makefile.base
9 changes: 9 additions & 0 deletions cpu/stm32_common/Makefile.include
@@ -0,0 +1,9 @@
# export the CPU family so we can differentiate between them in the code
FAM = $(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_')
export CFLAGS += -DCPU_FAM_$(FAM)

# includ common periph module
USEMODULE += periph_common

# export the common include directory
export INCLUDES += -I$(RIOTCPU)/stm32_common/include
42 changes: 42 additions & 0 deletions cpu/stm32_common/include/periph_cpu_common.h
@@ -0,0 +1,42 @@
/*
* Copyright (C) 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
* directory for more details.
*/

/**
* @ingroup cpu_stm32_common
* @{
*
* @file
* @brief Shared CPU specific definitions for the STM32 family
*
* @author Hauke Petersen <hauke.peterse@fu-berlin.de>
*/

#ifndef PERIPH_CPU_COMMON_H
#define PERIPH_CPU_COMMON_H

#include "cpu.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Use the shared SPI functions
* @{
*/
#define PERIPH_SPI_NEEDS_TRANSFER_BYTES
#define PERIPH_SPI_NEEDS_TRANSFER_REG
#define PERIPH_SPI_NEEDS_TRANSFER_REGS
/** @} */

#ifdef __cplusplus
}
#endif

#endif /* PERIPH_CPU_COMMON_H */
/** @} */
3 changes: 3 additions & 0 deletions cpu/stm32_common/periph/Makefile
@@ -0,0 +1,3 @@
MODULE = periph

include $(RIOTBASE)/Makefile.base

0 comments on commit f4587b3

Please sign in to comment.