mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu: added place for shared STM32 files
This commit is contained in:
parent
436d8f6bc2
commit
f4587b3794
3
cpu/stm32_common/Makefile
Normal file
3
cpu/stm32_common/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
DIRS = periph
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
9
cpu/stm32_common/Makefile.include
Normal file
9
cpu/stm32_common/Makefile.include
Normal file
@ -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
cpu/stm32_common/include/periph_cpu_common.h
Normal file
42
cpu/stm32_common/include/periph_cpu_common.h
Normal file
@ -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
cpu/stm32_common/periph/Makefile
Normal file
3
cpu/stm32_common/periph/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
MODULE = periph
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
Loading…
Reference in New Issue
Block a user