stm32f7: Include i2c_common_v2

With the addition of a define for I2C4, the existing common i2c
functions seem to work out of the box on the F7 (tested on an
STM32F750).
This commit is contained in:
Ross Schlaikjer
2019-04-04 11:06:03 -04:00
committed by Karl Palsson
parent edb39d43ee
commit 4db40e0839
3 changed files with 40 additions and 1 deletions

View File

@@ -46,6 +46,9 @@ specific memorymap.h header before including this header file.*/
#ifdef I2C3_BASE #ifdef I2C3_BASE
#define I2C3 I2C3_BASE #define I2C3 I2C3_BASE
#endif #endif
#ifdef I2C4_BASE
#define I2C4 I2C4_BASE
#endif
/**@}*/ /**@}*/
/* --- I2C registers ------------------------------------------------------- */ /* --- I2C registers ------------------------------------------------------- */

View File

@@ -0,0 +1,36 @@
/** @defgroup i2c_defines I2C Defines
*
* @brief <b>Defined Constants and Types for the STM32F7xx I2C</b>
*
* @ingroup STM32F7xx_defines
*
* @version 1.0.0
*
* @date 04 April 2019
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef LIBOPENCM3_I2C_H
#define LIBOPENCM3_I2C_H
#include <libopencm3/stm32/common/i2c_common_v2.h>
#endif

View File

@@ -46,8 +46,8 @@ OBJS = desig.o
OBJS += dma_common_f24.o OBJS += dma_common_f24.o
OBJS += flash_common_all.o flash_common_f.o flash_common_f24.o flash.o OBJS += flash_common_all.o flash_common_f.o flash_common_f24.o flash.o
OBJS += gpio.o gpio_common_all.o gpio_common_f0234.o OBJS += gpio.o gpio_common_all.o gpio_common_f0234.o
OBJS += i2c_common_v2.o
OBJS += pwr.o rcc.o OBJS += pwr.o rcc.o
OBJS += rcc_common_all.o OBJS += rcc_common_all.o
OBJS += rng_common_v1.o OBJS += rng_common_v1.o
OBJS += spi_common_all.o spi_common_v2.o OBJS += spi_common_all.o spi_common_v2.o