Browse Source

[WDT] Update for DM build

Signed-off-by: GuEe-GUI <2991707448@qq.com>
GuEe-GUI 2 weeks ago
parent
commit
37818aa518
2 changed files with 16 additions and 4 deletions
  1. 5 1
      components/drivers/watchdog/Kconfig
  2. 11 3
      components/drivers/watchdog/SConscript

+ 5 - 1
components/drivers/watchdog/Kconfig

@@ -1,3 +1,7 @@
-config RT_USING_WDT
+menuconfig RT_USING_WDT
     bool "Using Watch Dog device drivers"
     default n
+
+if RT_USING_DM && RT_USING_WDT
+    osource "$(SOC_DM_WDT_DIR)/Kconfig"
+endif

+ 11 - 3
components/drivers/watchdog/SConscript

@@ -1,8 +1,16 @@
 from building import *
 
-cwd     = GetCurrentDir()
-src     = Glob('*.c')
+group = []
+
+if not GetDepend(['RT_USING_WDT']):
+    Return('group')
+
+cwd = GetCurrentDir()
+list = os.listdir(cwd)
 CPPPATH = [cwd + '/../include']
-group   = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_WDT'], CPPPATH = CPPPATH)
+
+src = ['dev_watchdog.c']
+
+group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
 
 Return('group')