From 7db9df93e51900af072a3019f0c96dd4016f5ac4 Mon Sep 17 00:00:00 2001 From: chenyingchun0312 Date: Sat, 27 Nov 2021 17:22:24 +0800 Subject: [PATCH] [bsp/stm32/stm32l496] add I2C config --- bsp/stm32/stm32l496-st-nucleo/board/Kconfig | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/bsp/stm32/stm32l496-st-nucleo/board/Kconfig b/bsp/stm32/stm32l496-st-nucleo/board/Kconfig index 6a2a2c0b4c..e4b311025e 100644 --- a/bsp/stm32/stm32l496-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32l496-st-nucleo/board/Kconfig @@ -56,6 +56,44 @@ menu "On-chip Peripheral Drivers" depends on BSP_USING_LPUART1 && RT_SERIAL_USING_DMA default n endif + + menuconfig BSP_USING_I2C + bool "Enable I2C BUS" + default n + select RT_USING_I2C + select RT_USING_I2C_BITOPS + select RT_USING_PIN + if BSP_USING_I2C + menuconfig BSP_USING_I2C3 + bool "Enable I2C3 BUS" + default y + if BSP_USING_I2C3 + comment "Notice: PC0 --> 32; PC1 --> 33" + config BSP_I2C3_SCL_PIN + int "i2c3 scl pin number" + range 1 176 + default 32 + config BSP_I2C3_SDA_PIN + int "I2C3 sda pin number" + range 1 176 + default 33 + endif + + menuconfig BSP_USING_I2C4 + bool "Enable I2C4 BUS" + default n + if BSP_USING_I2C4 + comment "Notice: PC1 --> 33; PD6 --> 54" + config BSP_I2C4_SCL_PIN + int "i2c4 scl pin number" + range 1 176 + default 54 + config BSP_I2C4_SDA_PIN + int "I2C4 sda pin number" + range 1 176 + default 33 + endif + endif config BSP_USING_ON_CHIP_FLASH bool "Enable on-chip FLASH"