Skip to content
Open
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
6 changes: 6 additions & 0 deletions bsp/k230/.ci/attachconfig/ci.attachconfig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
scons.args: &scons
scons_arg:
- '--strict'
devices.spi:
<<: *scons
kconfig:
- CONFIG_RT_USING_SPI=y
- CONFIG_BSP_USING_SPI=y
- CONFIG_BSP_USING_SPI0=y
devices.i2c:
<<: *scons
kconfig:
Expand Down
8 changes: 8 additions & 0 deletions bsp/k230/.config
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ CONFIG_RT_USING_VDSO=y
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# CONFIG_PKG_USING_CHERRYECAT is not set
# end of system packages

#
Expand Down Expand Up @@ -1100,6 +1101,12 @@ CONFIG_RT_USING_VDSO=y
# CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER is not set
# end of GD32 Drivers

#
# HPMicro SDK
#
# CONFIG_PKG_USING_HPM_SDK is not set
# end of HPMicro SDK
# end of HAL & SDK Drivers

#
Expand Down Expand Up @@ -1619,6 +1626,7 @@ CONFIG_PKG_ZLIB_VER="latest"
#
# Drivers Configuration
#
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_I2C is not set
# CONFIG_BSP_USING_RTC is not set
# CONFIG_BSP_USING_ADC is not set
Expand Down
20 changes: 20 additions & 0 deletions bsp/k230/board/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
menu "Drivers Configuration"

menuconfig BSP_USING_SPI
bool "Enable SPI"
select RT_USING_SPI
default n

if BSP_USING_SPI
config RT_USING_SPI0
bool "Enable SPI0(OSPI controller support 1, 2, 4 and 8 lines, Max clock frequency is 200Mhz)"
default n

config RT_USING_SPI1
bool "Enable SPI1(QSPI0 controller support 1, 2 and 4 lines, Max clock frequency is 100Mhz)"
default n

config RT_USING_SPI2
bool "Enable SPI2(QSPI1 controller support 1, 2 and 4 lines, Max clock frequency is 100Mhz)"
default n
endif

menuconfig BSP_USING_I2C
bool "Enable I2C"
select RT_USING_I2C
Expand Down
11 changes: 11 additions & 0 deletions bsp/k230/drivers/interdrv/spi/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# RT-Thread building script for SPI component

from building import *

cwd = GetCurrentDir()
src = Glob('*.c')
CPPPATH = [cwd]

group = DefineGroup('SPI', src, depend = ['BSP_USING_SPI'], CPPPATH = CPPPATH)

Return('group')
Loading
Loading