Merge pull request #5308 from chenyingchun0312/feat_stm32l496_i2c

[bsp/stm32/stm32l496] add I2C config
This commit is contained in:
Bernard Xiong 2021-11-29 02:13:01 +08:00 committed by GitHub
commit f4c3b8339d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 0 deletions

View File

@ -56,6 +56,44 @@ menu "On-chip Peripheral Drivers"
depends on BSP_USING_LPUART1 && RT_SERIAL_USING_DMA depends on BSP_USING_LPUART1 && RT_SERIAL_USING_DMA
default n default n
endif 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 config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH" bool "Enable on-chip FLASH"