Skip to content

Commit 317dcd0

Browse files
committed
[bsp][drivers][soft_i2c]:merge the software i2c driver
1 parent ad205d2 commit 317dcd0

422 files changed

Lines changed: 2063 additions & 13856 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bsp/ESP32_C3/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ devices.swi2c:
2424
depends:
2525
- devices.i2c
2626
kconfig:
27-
- CONFIG_BSP_USING_SW_I2C=y
28-
- CONFIG_BSP_USING_SW_I2C0=y
27+
- CONFIG_RT_USING_SOFT_I2C=y
28+
- CONFIG_RT_USING_SOFT_I2C0=y
29+
- CONFIG_RT_SOFT_I2C0_SCL_PIN=19
30+
- CONFIG_RT_SOFT_I2C0_SDA_PIN=18
31+
- CONFIG_RT_SOFT_I2C0_BUS_NAME="swi2c0"
2932
devices.spi:
3033
kconfig:
3134
- CONFIG_RT_USING_SPI=y
@@ -60,4 +63,4 @@ devices.at:
6063
- CONFIG_RT_USING_AT=y
6164
- CONFIG_AT_USING_CLIENT=y
6265
- CONFIG_RT_USING_SAL=y
63-
- CONFIG_RT_USING_NETDEV=y
66+
- CONFIG_RT_USING_NETDEV=y

bsp/ESP32_C3/drivers/Kconfig

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,6 @@ menu "On-chip Peripheral Drivers"
7676
bool "Enable HardWare I2C"
7777
default n
7878

79-
menuconfig BSP_USING_SW_I2C
80-
bool "Enable SoftWare I2C"
81-
default n
82-
if BSP_USING_SW_I2C
83-
config BSP_USING_SW_I2C0
84-
bool "Enable SoftWare I2C0"
85-
default n
86-
if BSP_USING_SW_I2C0
87-
config BSP_SW_I2C0_SDA_PIN
88-
int "SWI2C0 sda pin number"
89-
range 0 21
90-
default 18
91-
config BSP_SW_I2C0_SCL_PIN
92-
int "SWI2C0 scl pin number"
93-
range 0 21
94-
default 19
95-
endif
96-
endif
9779
endif
9880

9981
menuconfig BSP_USING_SPI
@@ -171,4 +153,4 @@ config BSP_ENABLE_GDBSTUB
171153
bool "Enable ESP_GDBSTUB compontent"
172154
default n
173155

174-
endmenu
156+
endmenu

bsp/ESP32_C3/drivers/SConscript

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ if GetDepend('BSP_USING_ADC'):
1818
if GetDepend('BSP_USING_I2C'):
1919
src += ['drv_hw_i2c.c']
2020

21-
if GetDepend('BSP_USING_SW_I2C'):
22-
src += ['drv_sw_i2c.c']
23-
2421
if GetDepend('BSP_USING_PWM'):
2522
src += ['drv_pwm.c']
2623

bsp/ESP32_C3/drivers/drv_sw_i2c.c

Lines changed: 0 additions & 199 deletions
This file was deleted.

bsp/ESP32_C3/drivers/drv_sw_i2c.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

bsp/Infineon/libraries/HAL_Drivers/SConscript

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ if GetDepend(['RT_USING_SERIAL']):
1818
else:
1919
src += ['drv_uart.c']
2020

21-
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
22-
if GetDepend('BSP_USING_I2C1'):
23-
src += ['drv_soft_i2c.c']
24-
2521
if GetDepend(['RT_USING_I2C']):
2622
if GetDepend('BSP_USING_HW_I2C1') or GetDepend('BSP_USING_HW_I2C3') or GetDepend('BSP_USING_HW_I2C4') or GetDepend('BSP_USING_HW_I2C6'):
2723
src += ['drv_i2c.c']

0 commit comments

Comments
 (0)