Skip to content

Commit 9ad3d1e

Browse files
committed
[drivers/spi]统一软件SPI配置
1 parent a63b97e commit 9ad3d1e

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

components/drivers/spi/Kconfig

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,11 @@ config RT_USING_SPI
33
default n
44

55
if RT_USING_SPI
6-
config RT_USING_SPI_BITOPS
7-
select RT_USING_PIN
8-
bool "Use GPIO to simulate SPI"
9-
default n
10-
11-
if RT_USING_SPI_BITOPS
12-
config RT_SPI_BITOPS_DEBUG
13-
bool "Use simulate SPI debug message"
14-
default n
15-
endif
166

177
menuconfig RT_USING_SOFT_SPI
18-
bool "Use GPIO to soft simulate SPI"
8+
bool "Use GPIO to simulate SPI"
199
default n
2010
select RT_USING_PIN
21-
select RT_USING_SPI_BITOPS
2211
if RT_USING_SOFT_SPI
2312
menuconfig RT_USING_SOFT_SPI0
2413
bool "Enable SPI0 Bus (software simulation)"
@@ -188,9 +177,13 @@ config RT_USING_SPI
188177
range 0 32767
189178
default 1
190179
endif
191-
192180
endif
193181

182+
config RT_SPI_BITOPS_DEBUG
183+
bool "Use simulate SPI debug message"
184+
depends on RT_USING_SOFT_SPI
185+
default n
186+
194187
config RT_USING_QSPI
195188
bool "Enable QSPI mode"
196189
default n

components/drivers/spi/SConscript

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ src = ['dev_spi_core.c', 'dev_spi.c']
77
CPPPATH = [cwd, cwd + '/../include']
88
LOCAL_CFLAGS = ''
99

10-
if GetDepend('RT_USING_SPI_BITOPS'):
11-
src += ['dev_spi_bit_ops.c']
12-
1310
if GetDepend('RT_USING_SOFT_SPI'):
11+
src += ['dev_spi_bit_ops.c']
1412
src += ['dev_soft_spi.c']
1513

1614
if GetDepend('RT_USING_QSPI'):

0 commit comments

Comments
 (0)