@@ -57,12 +57,65 @@ menu "On-chip Peripheral Drivers"
5757 default n
5858 endif
5959
60-
6160 config BSP_USING_ONCHIP_RTC
6261 bool "Enable Onchip RTC"
6362 select RT_USING_RTC
6463 default n
6564
65+ menuconfig BSP_USING_I2C
66+ bool "Enable I2C BUS (software simulation)"
67+ select RT_USING_I2C
68+ select RT_USING_I2C_BITOPS
69+ select RT_USING_PIN
70+ default n
71+ if BSP_USING_I2C
72+ menuconfig BSP_USING_I2C1
73+ bool "Enable I2C1 BUS (software simulation)"
74+ default n
75+ select RT_USING_I2C
76+ select RT_USING_I2C_BITOPS
77+ select RT_USING_PIN
78+ if BSP_USING_I2C1
79+ comment "Notice: PB6 --> 22; PB7 --> 23"
80+ config BSP_I2C1_SCL_PIN
81+ int "I2C1 scl pin number"
82+ range 0 175
83+ default 22
84+ config BSP_I2C1_SDA_PIN
85+ int "I2C1 sda pin number"
86+ range 0 175
87+ default 23
88+ endif
89+ menuconfig BSP_USING_I2C2
90+ bool "Enable I2C2 BUS (software simulation)"
91+ default n
92+ if BSP_USING_I2C2
93+ comment "Notice: PH13 --> 125; PH15 --> 127"
94+ config BSP_I2C2_SCL_PIN
95+ int "i2c2 scl pin number"
96+ range 1 176
97+ default 127
98+ config BSP_I2C2_SDA_PIN
99+ int "I2C2 sda pin number"
100+ range 0 175
101+ default 125
102+ endif
103+ menuconfig BSP_USING_I2C3
104+ bool "Enable I2C3 BUS (software simulation)"
105+ default n
106+ if BSP_USING_I2C3
107+ comment "Notice: PH12 --> 124; PH11 --> 123"
108+ config BSP_I2C3_SCL_PIN
109+ int "i2c3 scl pin number"
110+ range 0 175
111+ default 123
112+ config BSP_I2C3_SDA_PIN
113+ int "I2C3 sda pin number"
114+ range 0 175
115+ default 124
116+ endif
117+ endif
118+
66119 source "../libraries/HAL_Drivers/Kconfig"
67120
68121endmenu
0 commit comments