Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/drivers/spi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ menuconfig RT_USING_SPI
menuconfig RT_USING_SPI_ISR
bool "Enable interrupt-safe SPI operations (using spinlocks in ISR context)"
default y

config RT_USING_SPI_BITOPS
bool "Enable SPI bit-bang operation functions"
default n
Comment on lines +11 to +13

Copilot AI Dec 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title should follow RT-Thread format with lowercase prefix: [module][subsystem] Description. The current title uses [fix] drivers: spi: format which doesn't match the standard.

Suggested title format: [spi] Refactor SPI bit operations into independent configuration option or [drivers][spi] Refactor SPI bit operations into independent configuration option

PR 标题应遵循 RT-Thread 格式,使用小写前缀:[模块][子系统] 描述。当前标题使用 [fix] drivers: spi: 格式,不符合标准。

建议标题格式:[spi] Refactor SPI bit operations into independent configuration option[drivers][spi] Refactor SPI bit operations into independent configuration option

Copilot generated this review using guidance from repository custom instructions.
Comment thread
RCSN marked this conversation as resolved.

menuconfig RT_USING_SOFT_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)"
Expand Down
4 changes: 3 additions & 1 deletion components/drivers/spi/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ src = ['dev_spi_core.c', 'dev_spi.c']
CPPPATH = [cwd, cwd + '/../include']
LOCAL_CFLAGS = ''

if GetDepend('RT_USING_SOFT_SPI'):
if GetDepend('RT_USING_SPI_BITOPS'):
src += ['dev_spi_bit_ops.c']

if GetDepend('RT_USING_SOFT_SPI'):
src += ['dev_soft_spi.c']

if GetDepend('RT_USING_QSPI'):
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/dev_soft_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#error "Please define at least one RT_USING_SOFT_SPIx"
/*
This driver can be disabled at:
menuconfig -> RT-Thread Components -> Device Drivers -> Using I2C device drivers
menuconfig -> RT-Thread Components -> Device Drivers -> Using SPI Bus/Device device drivers -> Use GPIO to simulate SPI
*/
#endif

Expand Down