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
1 change: 1 addition & 0 deletions bsp/k230/.config
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,7 @@ CONFIG_BSP_USING_SDIO0=y
# CONFIG_BSP_SDIO0_1V8 is not set
# CONFIG_BSP_USING_SDIO1 is not set
CONFIG_BSP_SD_MNT_DEVNAME="sd0p1"
# CONFIG_BSP_USING_TIMERS is not set
Copy link
Member

Choose a reason for hiding this comment

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

.config和rtconfig.h 没有特殊情况可以不用提交。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这是一个新增的配置项,所以更新一下应该更好吧。

Copy link
Member

Choose a reason for hiding this comment

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

这是注释

Copy link
Contributor Author

@unicornx unicornx May 30, 2025

Choose a reason for hiding this comment

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

这是注释

这次 pr 在 Kconfig 中增加一项菜单 BSP_USING_TIMERS(默认为 n),所以然后运行 scons --menuconfig 后 kconfiglib 会自动更新出来这个。所以这个修改是需要的。

# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_UTEST_DRIVERS is not set
# end of Drivers Configuration
Expand Down
31 changes: 31 additions & 0 deletions bsp/k230/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,37 @@ menu "Drivers Configuration"
default "sd0p1"
endif

menuconfig BSP_USING_TIMERS
bool "Enable Hardware Timers"
select RT_USING_HWTIMER
default n

if BSP_USING_TIMERS
config BSP_USING_TIMER0
bool "Enable Timer0"
default n

config BSP_USING_TIMER1
bool "Enable Timer1"
default n

config BSP_USING_TIMER2
bool "Enable Timer2"
default n

config BSP_USING_TIMER3
bool "Enable Timer3"
default n

config BSP_USING_TIMER4
bool "Enable Timer4"
default n

config BSP_USING_TIMER5
bool "Enable Timer5"
default n
endif

menuconfig BSP_USING_WDT
bool "Enable Watchdog Timer"
select RT_USING_WDT
Expand Down
19 changes: 19 additions & 0 deletions bsp/k230/drivers/interdrv/hwtimer/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# RT-Thread building script for component

from building import *

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

group = DefineGroup('TIMER', src, depend = ['BSP_USING_TIMERS'], CPPPATH = CPPPATH)

objs = [group]

list = os.listdir(cwd)

for item in list:
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
objs = objs + SConscript(os.path.join(item, 'SConscript'))

Return('objs')
Loading