[drivers/spi]统一软件SPI配置

This commit is contained in:
Rbb666
2025-02-09 15:48:49 +08:00
committed by Rbb666
parent 6e3c9acd39
commit d83d71cc05
15 changed files with 21 additions and 29 deletions
+6 -13
View File
@@ -3,22 +3,11 @@ config RT_USING_SPI
default n
if RT_USING_SPI
config RT_USING_SPI_BITOPS
select RT_USING_PIN
bool "Use GPIO to simulate SPI"
default n
if RT_USING_SPI_BITOPS
config RT_SPI_BITOPS_DEBUG
bool "Use simulate SPI debug message"
default n
endif
menuconfig RT_USING_SOFT_SPI
bool "Use GPIO to soft simulate SPI"
bool "Use GPIO to simulate SPI"
default n
select RT_USING_PIN
select RT_USING_SPI_BITOPS
if RT_USING_SOFT_SPI
menuconfig RT_USING_SOFT_SPI0
bool "Enable SPI0 Bus (software simulation)"
@@ -188,9 +177,13 @@ config RT_USING_SPI
range 0 32767
default 1
endif
endif
config RT_SPI_BITOPS_DEBUG
bool "Use simulate SPI debug message"
depends on RT_USING_SOFT_SPI
default n
config RT_USING_QSPI
bool "Enable QSPI mode"
default n
+1 -3
View File
@@ -7,10 +7,8 @@ src = ['dev_spi_core.c', 'dev_spi.c']
CPPPATH = [cwd, cwd + '/../include']
LOCAL_CFLAGS = ''
if GetDepend('RT_USING_SPI_BITOPS'):
src += ['dev_spi_bit_ops.c']
if GetDepend('RT_USING_SOFT_SPI'):
src += ['dev_spi_bit_ops.c']
src += ['dev_soft_spi.c']
if GetDepend('RT_USING_QSPI'):