From f3c620b51b6ee66bd45968d84f62f3ecf376d0ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20R=2E=20H=C3=B6lzlwimmer?= Date: Sun, 26 Aug 2018 22:53:15 +0200 Subject: [PATCH] stm32f7: spi: include common code --- include/libopencm3/stm32/f7/spi.h | 37 +++++++++++++++++++++++++++++++ include/libopencm3/stm32/spi.h | 2 ++ lib/stm32/f7/Makefile | 1 + lib/stm32/f7/spi.c | 31 ++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 include/libopencm3/stm32/f7/spi.h create mode 100644 lib/stm32/f7/spi.c diff --git a/include/libopencm3/stm32/f7/spi.h b/include/libopencm3/stm32/f7/spi.h new file mode 100644 index 00000000..e99405a1 --- /dev/null +++ b/include/libopencm3/stm32/f7/spi.h @@ -0,0 +1,37 @@ +/** @defgroup spi_defines SPI Defines + +@brief Defined Constants and Types for the STM32F7xx SPI + +@ingroup STM32F7xx_defines + +@version 1.0.0 + +@date 28 August 2018 + +LGPL License Terms @ref lgpl_license + */ + +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef LIBOPENCM3_SPI_H +#define LIBOPENCM3_SPI_H + +#include + +#endif + diff --git a/include/libopencm3/stm32/spi.h b/include/libopencm3/stm32/spi.h index 8767dfd4..2d32e61c 100644 --- a/include/libopencm3/stm32/spi.h +++ b/include/libopencm3/stm32/spi.h @@ -30,6 +30,8 @@ # include #elif defined(STM32F4) # include +#elif defined(STM32F7) +# include #elif defined(STM32L0) # include #elif defined(STM32L1) diff --git a/lib/stm32/f7/Makefile b/lib/stm32/f7/Makefile index e4b317a0..61cea7a0 100644 --- a/lib/stm32/f7/Makefile +++ b/lib/stm32/f7/Makefile @@ -49,6 +49,7 @@ OBJS += pwr.o rcc.o OBJS += rcc_common_all.o OBJS += rng_common_v1.o +OBJS += spi_common_all.o spi_common_v1.o spi_common_v1_frf.o OBJS += usart_common_all.o usart_common_v2.o diff --git a/lib/stm32/f7/spi.c b/lib/stm32/f7/spi.c new file mode 100644 index 00000000..ace451ac --- /dev/null +++ b/lib/stm32/f7/spi.c @@ -0,0 +1,31 @@ +/** @defgroup spi_file SPI + +@ingroup STM32F7xx + +@brief libopencm3 STM32F7xx SPI + +@version 1.0.0 + +@date 28 August 2018 + +LGPL License Terms @ref lgpl_license +*/ + +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include