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
9 changes: 9 additions & 0 deletions bsp/k230/.ci/attachconfig/ci.attachconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scons.args: &scons
scons_arg:
- '--strict'
devices.i2c:
<<: *scons
kconfig:
- CONFIG_RT_USING_I2C=y
- CONFIG_BSP_USING_I2C=y
- CONFIG_BSP_USING_I2C0=y
3 changes: 3 additions & 0 deletions bsp/k230/.config
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ CONFIG_FINSH_THREAD_STACK_SIZE=8192
CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES=5
# CONFIG_FINSH_USING_WORD_OPERATION is not set
# CONFIG_FINSH_USING_FUNC_EXT is not set
CONFIG_FINSH_USING_SYMTAB=y
CONFIG_FINSH_CMD_SIZE=80
CONFIG_MSH_USING_BUILT_IN_COMMANDS=y
Expand Down Expand Up @@ -425,6 +426,7 @@ CONFIG_RT_USING_POSIX_TIMER=y
#
CONFIG_RT_USING_SAL=y
CONFIG_SAL_INTERNET_CHECK=y
CONFIG_SOCKET_TABLE_STEP_LEN=4

#
# Docking with protocol stacks
Expand Down Expand Up @@ -1617,6 +1619,7 @@ CONFIG_PKG_ZLIB_VER="latest"
#
# Drivers Configuration
#
# CONFIG_BSP_USING_I2C is not set
# CONFIG_BSP_USING_RTC is not set
# CONFIG_BSP_USING_ADC is not set
# CONFIG_BSP_USING_TS is not set
Expand Down
27 changes: 27 additions & 0 deletions bsp/k230/board/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
menu "Drivers Configuration"
menuconfig BSP_USING_I2C
bool "Enable I2C"
select RT_USING_I2C
default n

if BSP_USING_I2C
config BSP_USING_I2C0
bool "Enable I2C0"
default n

config BSP_USING_I2C1
bool "Enable I2C1"
default n

config BSP_USING_I2C2
bool "Enable I2C2"
default n

config BSP_USING_I2C3
bool "Enable I2C3"
default n

config BSP_USING_I2C4
bool "Enable I2C4"
default n

endif

config BSP_USING_RTC
bool "Enable RTC"
Expand Down
11 changes: 11 additions & 0 deletions bsp/k230/drivers/interdrv/i2c/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# RT-Thread building script for I2C component

from building import *

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

group = DefineGroup('I2C', src, depend = ['BSP_USING_I2C'], CPPPATH = CPPPATH)

Return('group')
Loading