Add functions for get the all the bertos modules and define lists
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 22 Jan 2009 19:38:09 +0000 (19:38 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 22 Jan 2009 19:38:09 +0000 (19:38 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2210 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 1376942ace266bca2a332e7672f06fa386306a42..479f88eea08cd3727f86cb3afcb29038cdb491ec 100644 (file)
@@ -170,6 +170,12 @@ def loadModuleInfos(path):
             return moduleInfos
     return {}
 
+def loadModuleInfosDict(path):
+    moduleInfosDict = {}
+    for filename, path in findDefinitions("*.h", path):
+        moduleInfosDict.update(loadModuleInfos(path + "/" + filename))
+    return moduleInfosDict
+
 def loadDefineLists(path):
     """
     Return a dict with the name of the list as key and a list of string as value
@@ -183,4 +189,10 @@ def loadDefineLists(path):
         if index != -1:
             exec(comment[index + 1:])
             listDict.update(WIZARD_LIST)
-    return listDict
\ No newline at end of file
+    return listDict
+
+def loadDefineListsDict(path):
+    defineListsDict = {}
+    for filename, path in findDefinitions("*.h", path):
+        defineListsDict.update(loadDefineLists(path + "/" + filename))
+    return defineListsDict
\ No newline at end of file