From f8495006a54fdc4c70b6750ce2895b553388c543 Mon Sep 17 00:00:00 2001 From: Matthew Koch Date: Mon, 8 Apr 2019 01:06:33 +0000 Subject: [PATCH] Merged in mjkoch/nuttx (pull request #850) I2C1 config on stm32f746g-disco. Typo in stm32f7/stm32_i2c.c Approved-by: Gregory Nutt --- arch/arm/src/stm32f7/stm32_i2c.c | 2 +- configs/stm32f746g-disco/include/board.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/arch/arm/src/stm32f7/stm32_i2c.c index faf082a411..6b94774e1e 100644 --- a/arch/arm/src/stm32f7/stm32_i2c.c +++ b/arch/arm/src/stm32f7/stm32_i2c.c @@ -271,7 +271,7 @@ # define INVALID_CLOCK_SOURCE # endif #endif -#ifdef CONFIG_STM32F7_I2C1 +#ifdef CONFIG_STM32F7_I2C2 # if STM32_RCC_DCKCFGR2_I2C2SRC != RCC_DCKCFGR2_I2C2SEL_HSI # warning "Clock Source STM32_RCC_DCKCFGR2_I2C2SRC must be HSI" # define INVALID_CLOCK_SOURCE diff --git a/configs/stm32f746g-disco/include/board.h b/configs/stm32f746g-disco/include/board.h index 0a71112f34..0903e13bcb 100644 --- a/configs/stm32f746g-disco/include/board.h +++ b/configs/stm32f746g-disco/include/board.h @@ -348,6 +348,13 @@ #define GPIO_USART1_RX GPIO_USART1_RX_2 #define GPIO_USART1_TX GPIO_USART1_TX_1 +/* I2C1 - the I2C1 bus is shared by audio (Cirrus WM8994), + * camera (DCMI SDA/SCL) and external connectors CN2 & Arduino D14/D15. + */ + +#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 +#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 + /* I2C - There is a FT5336 TouchPanel on I2C3 using these pins: */ #define GPIO_I2C3_SCL GPIO_I2C3_SCL_2