Skip to content

Commit de03425

Browse files
committed
add some on chip features support
1 parent 1ebc2d8 commit de03425

File tree

1 file changed

+39
-0
lines changed
  • bsp/stm32/stm32f407-micu/board

1 file changed

+39
-0
lines changed

bsp/stm32/stm32f407-micu/board/Kconfig

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,45 @@ menu "On-chip Peripheral Drivers"
117117
bool "RTC USING LSI"
118118
endchoice
119119
endif
120+
121+
menuconfig BSP_USING_I2C
122+
bool "Enable I2C"
123+
default n
124+
if BSP_USING_I2C
125+
menuconfig BSP_USING_I2C1
126+
bool "Enable I2C1 BUS (software simulation)"
127+
default n
128+
select RT_USING_I2C
129+
select RT_USING_I2C_BITOPS
130+
select RT_USING_PIN
131+
if BSP_USING_I2C1
132+
config BSP_I2C1_SCL_PIN
133+
int "i2c1 scl pin number"
134+
range 0 143
135+
default 22
136+
config BSP_I2C1_SDA_PIN
137+
int "I2C1 sda pin number"
138+
range 0 143
139+
default 23
140+
endif
141+
142+
menuconfig BSP_USING_I2C2
143+
bool "Enable I2C2 BUS (software simulation)"
144+
default n
145+
select RT_USING_I2C
146+
select RT_USING_I2C_BITOPS
147+
select RT_USING_PIN
148+
if BSP_USING_I2C2
149+
config BSP_I2C2_SCL_PIN
150+
int "i2c2 scl pin number"
151+
range 0 143
152+
default 26
153+
config BSP_I2C2_SDA_PIN
154+
int "I2C2 sda pin number"
155+
range 0 143
156+
default 27
157+
endif
158+
endif
120159
source "$(BSP_DIR)/../libraries/HAL_Drivers/drivers/Kconfig"
121160

122161
endmenu

0 commit comments

Comments
 (0)