Change the comment style for the modules and the list, and use the newParser to parse...
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 16 Feb 2009 10:02:32 +0000 (10:02 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 16 Feb 2009 10:02:32 +0000 (10:02 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2346 38d2e660-2303-0410-9eaa-f027e97ec537

35 files changed:
bertos/algo/crc.h
bertos/algo/md2.h
bertos/algo/pid_control.h
bertos/algo/ramp.h
bertos/algo/randpool.h
bertos/algo/rle.h
bertos/algo/rotating_hash.h
bertos/algo/tea.h
bertos/cfg/cfg_timer.h
bertos/cfg/log.h
bertos/cpu/avr/drv/ser_avr.h
bertos/drv/adc.h
bertos/drv/dataflash.h
bertos/drv/dc_motor.h
bertos/drv/eeprom.h
bertos/drv/flash25.h
bertos/drv/ft245rl.h
bertos/drv/i2c.h
bertos/drv/ntc.h
bertos/drv/pcf8574.h
bertos/drv/phase.h
bertos/drv/pwm.h
bertos/drv/ser.h
bertos/drv/spi_bitbang.h
bertos/drv/stepper.h
bertos/drv/thermo.h
bertos/drv/timer.h
bertos/drv/wdt.h
bertos/kern/kfile.h
bertos/kern/proc.h
bertos/net/pocketbus.h
bertos/net/pocketcmd.h
bertos/net/xmodem.h
wizard/bertos_utils.py
wizard/newParser.py

index 51ce4dd0f8c23ba6932194e69b7e3546983f08e3..be8f0df8be16915f3318852f3329f2bda9e70fc1 100644 (file)
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
- * $WIZARD_MODULE = {
- * "name" : "crc16",
- * "depends" : [],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "crc16"
  */
 
 #ifndef ALGO_CRC_H
  */
 
 #ifndef ALGO_CRC_H
index bce2947c5c59348c8bb3dc2d5a7a423c795c31b9..6ddc95131e86cc90db6823b95bad5670f8d7214a 100644 (file)
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "md2",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_md2.h"
- * }
+ * $WIZ$ module_name = "md2"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_md2.h"
  */
 
 #ifndef ALGO_MD2_H
  */
 
 #ifndef ALGO_MD2_H
index 1aa56d68b8f296aa47b4bb5f9cc0522b84b92621..ead5faa73ab45c4e4005eb5eb1520b4537b54adb 100644 (file)
  *
  * \author Daniele Basile <asterix@develer.com>
  *
  *
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "pid_control",
- * "depends" : ["timer"],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "pid_control"
+ * $WIZ$ module_depends = "timer"
  */
 
 #ifndef ALGO_PID_CONTROL_H
  */
 
 #ifndef ALGO_PID_CONTROL_H
index 1ca7bb76eb574ffd7bc4d395619a2409d8105d7a..6ec37c8c9ecd865e939efdd882372e9c478c012a 100644 (file)
  * \author Giovanni Bajo <rasky@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
  * \author Giovanni Bajo <rasky@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "ramp",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_ramp.h"
- * }
+ * $WIZ$ module_name = "ramp"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_ramp.h"
  */
 
 #ifndef ALGO_RAMP_H
  */
 
 #ifndef ALGO_RAMP_H
index fe999e32b12af7b2643f4b3c177707afc47595cb..6e6a7dba2be83039ad80e10da40f73d1404f3cf0 100644 (file)
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "randpool",
- * "depends" : ["timer"],
- * "configuration" : "bertos/cfg/cfg_randpool.h"
- * }
+ * $WIZ$ module_name = "randpool"
+ * $WIZ$ module_depends = "timer"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_randpool.h"
  */
 
 #ifndef ALGO_RANDPOOL_H
  */
 
 #ifndef ALGO_RANDPOOL_H
index 382f9079682e38f7c126e3e6da193b7790251bdd..7cb34b1b5d5946d6095cadd1c0faa2c9f9e76553 100644 (file)
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
- * $WIZARD_MODULE = {
- * "name" : "rle",
- * "depends" : [],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "rle"
  */
 #ifndef RLE_H
 #define RLE_H
  */
 #ifndef RLE_H
 #define RLE_H
index c0d3d9b548cbb576e2a5394b06ff8b32848792db..1280569b1b4aa207ce062569d99d7e3f14bc2ab0 100644 (file)
  *
  * \author Francesco Sacchi <batt@develer.com>
  *
  *
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "rotating_hash",
- * "depends" : [],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "rotating_hash"
  */
 
 
  */
 
 
index 72ea01f0769e9600a06e01d16960048a3bb1f836..712a4ea9ca2fcd331bbb99b690ad0474f27f3f02 100644 (file)
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "tea",
- * "depends" : [],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "tea"
  */
 
 #ifndef ALGO_TEA_H
  */
 
 #ifndef ALGO_TEA_H
index 7ed1955809a2805c748197a2e788b5f73bd2e5a6..5262f80d3cd61292a45484eb65a9b7f2d5f92410 100644 (file)
@@ -35,6 +35,7 @@
  * \version $Id$
  *
  * \author Daniele Basile <asterix@develer.com>
  * \version $Id$
  *
  * \author Daniele Basile <asterix@develer.com>
+ * $WIZ$
  */
 
 #ifndef CFG_TIMER_H
  */
 
 #ifndef CFG_TIMER_H
@@ -42,7 +43,7 @@
 
 /**
  *
 
 /**
  *
- * $WIZARD_LIST = { "timer_select" : ["TIMER_DEFAULT"] }
+ * $WIZ$ timer_select = "TIMER_DEFAULT"
  */
 
 /// Hardware timer selection for drv/timer.c. $WIZARD = { "type" : "enum", "value_list" : "timer_select" }
  */
 
 /// Hardware timer selection for drv/timer.c. $WIZARD = { "type" : "enum", "value_list" : "timer_select" }
index 444c1d73219e3b36323d0e5ec9d9eca6258c454f..9318697de97e81ad19eac2c3b7cd5f7fce23efe0 100644 (file)
@@ -85,7 +85,8 @@
  *
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
- *
+ * 
+ * $WIZ$
  */
 
 #ifndef CFG_LOG_H
  */
 
 #ifndef CFG_LOG_H
  * The priority level go from error (highest) to info (lowest) (see cfg/debug.h
  * for more detail).
  *
  * The priority level go from error (highest) to info (lowest) (see cfg/debug.h
  * for more detail).
  *
- * $WIZARD_LIST = {
- * "log_level" : ["LOG_LVL_NONE", "LOG_LVL_ERR", "LOG_LVL_WARN", "LOG_LVL_INFO"]
+ * $WIZ$ log_level = "LOG_LVL_NONE", "LOG_LVL_ERR", "LOG_LVL_WARN", "LOG_LVL_INFO"
  * }
  */
 #define LOG_LVL_NONE      0
  * }
  */
 #define LOG_LVL_NONE      0
  * There are two logging format: terse and verbose.  The latter prepends
  * function names and line number information to each log entry.
  *
  * There are two logging format: terse and verbose.  The latter prepends
  * function names and line number information to each log entry.
  *
- * $WIZARD_LIST = {
- * "log_format" : ["LOG_FMT_VERBOSE", "LOG_FMT_TERSE"]
- * }
+ * $WIZ$ log_format = "LOG_FMT_VERBOSE", "LOG_FMT_TERSE"
  */
 #define LOG_FMT_VERBOSE   1
 #define LOG_FMT_TERSE     0
  */
 #define LOG_FMT_VERBOSE   1
 #define LOG_FMT_TERSE     0
index 237c3040d03dfacaa1ece8d8dd025626c4f488e0..90791e4f22b7d2bcff9d7749d5bea92b3da4400a 100644 (file)
@@ -35,6 +35,7 @@
  * \author Daniele Basile <asterix@develer.com>
  *
  * \brief Low-level serial module for AVR (interface).
  * \author Daniele Basile <asterix@develer.com>
  *
  * \brief Low-level serial module for AVR (interface).
+ *
  */
 
 #ifndef DRV_SER_AVR_H
  */
 
 #ifndef DRV_SER_AVR_H
@@ -63,8 +64,7 @@ typedef uint8_t serstatus_t;
 /**
  * SPI clock polarity.
  *
 /**
  * SPI clock polarity.
  *
- * $WIZARD_LIST = {
- * "ser_spi_pol" : ["SPI_NORMAL_LOW", "SPI_NORMAL_HIGH"]
+ * $WIZ$ ser_spi_pol = "SPI_NORMAL_LOW", "SPI_NORMAL_HIGH"
  * }
  */
 #define SPI_NORMAL_LOW      0
  * }
  */
 #define SPI_NORMAL_LOW      0
@@ -73,8 +73,7 @@ typedef uint8_t serstatus_t;
 /**
  * SPI clock phase.
  *
 /**
  * SPI clock phase.
  *
- * $WIZARD_LIST = {
- * "ser_spi_phase": ["SPI_SAMPLE_ON_FIRST_EDGE", "SPI_SAMPLE_ON_SECOND_EDGE"]
+ * $WIZ$ ser_spi_phase = "SPI_SAMPLE_ON_FIRST_EDGE", "SPI_SAMPLE_ON_SECOND_EDGE"
  * }
  */
 #define SPI_SAMPLE_ON_FIRST_EDGE    0
  * }
  */
 #define SPI_SAMPLE_ON_FIRST_EDGE    0
index d1b8b56b3ba09c4f9610abcc8dd74d9ab99b0462..581bc4c2a3dadca87269bdde96d5babaec8b37ee 100644 (file)
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "adc",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_adc.h"
- * }
+ * $WIZ$ module_name = "adc"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_adc.h"
  */
 
 
  */
 
 
index fa64ad0756598773a856b8085258d3d460007724..5f8263f8b095a2133bf8ecd4b2917e253aeee95d 100644 (file)
  *
  * \author Daniele Basile <asterix@develer.com>
  *
  *
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "dataflash",
- * "depends" : ["kfile"],
- * "configuration" : "bertos/cfg/cfg_dataflash.h"
+ * $WIZ$ module_name = "dataflash"
+ * $WIZ$ module_depends = "kfile"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_dataflash.h"
  * }
  */
 
  * }
  */
 
index d9651d686912c34b28f4a0612d2c0e501f3c7d29..ebd91e280b17b8dbc778e19903b1eec3f5a9d220 100644 (file)
  *
  * \author Daniele Basile <asterix@develer.com>
  *
  *
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "dc_motor",
- * "depends" : ["pwm", "pid_control", "adc", "timer"],
- * "configuration" : "bertos/cfg/cfg_dc_motor.h"
- * }
+ * $WIZ$ module_name = "dc_motor"
+ * $WIZ$ module_depends = "pwm", "pid_control", "adc", "timer"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_dc_motor.h"
  */
 
 #ifndef DRV_DC_MOTOR_H
  */
 
 #ifndef DRV_DC_MOTOR_H
index 6c6cd9117a78b6e083490769e2600c4a2c74ea14..91c8dfe1073ef273a9ac096c1e2a0dca514cd273 100644 (file)
  * \author Stefano Fedrigo <aleph@develer.com>
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \author Stefano Fedrigo <aleph@develer.com>
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
- * $WIZARD_MODULE = {
- * "name" : "eeprom",
- * "depends" : ["kfile"],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "eeprom"
+ * $WIZ$ module_depends = "kfile"
  */
 
 #ifndef DRV_EEPROM_H
  */
 
 #ifndef DRV_EEPROM_H
index e3fd3e9dfc6c049f9d22d254a3bad9d4e8f3f857..53ca9197ef63d45ef3a285874a33f8412689efd6 100644 (file)
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
  * \version $Id$
  * \author Daniele Basile <asterix@develer.com>
  *
- * $wizard_module = {
- * "name" : "flash25",
- * "depends" : ["kfile"],
- * "configuration" : "bertos/cfg/cfg_flash25.h"
- * }
+ * $WIZ$ module_name = "flash25"
+ * $WIZ$ module_depends = "kfile"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_flash25.h"
  */
 
 
  */
 
 
@@ -90,9 +88,7 @@ INLINE Flash25 * FLASH25_CAST(KFile *fd)
  * this drive. Every time we call flash25_init() function we check
  * if memory defined are right (see flash25.c form more detail).
  *
  * this drive. Every time we call flash25_init() function we check
  * if memory defined are right (see flash25.c form more detail).
  *
- * $WIZARD_LIST = {
- * "flash25_list" : ["FLASH25_AT25F2048"]
- * }
+ * $WIZ$ flash25_list = "FLASH25_AT25F2048"
  */
 #define FLASH25_AT25F2048         1
 
  */
 #define FLASH25_AT25F2048         1
 
index 10207b2e7926ef888b38e97051bd5c42719dbf7b..ced7ee19fad9fa5bf4d338676f6204bdc375e37d 100644 (file)
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "ft245rl",
- * "depends" : ["kfile", "timer"],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "ft245rl"
+ * $WIZ$ module_depends = "kfile", "timer"
  */
 
 
  */
 
 
index 70e33fb149107f5127199dcbfbf2b7c85ee757f9..9327ff8d5d75c37fd5ef01e86797a9d9739cb256 100644 (file)
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "i2c",
- * "depends" : [],
+ * $WIZ$ module_name = "i2c"
  * "configuration" : "bertos/cfg/cfg_i2c.h"
  * "configuration" : "bertos/cfg/cfg_i2c.h"
- * }
  */
  */
 #ifndef DRV_I2C_H
 #define DRV_I2C_H
 
 #ifndef DRV_I2C_H
 #define DRV_I2C_H
 
@@ -56,9 +54,7 @@
  * use that.
  * With this you can choose, at compile time, which backend to use.
  *
  * use that.
  * With this you can choose, at compile time, which backend to use.
  *
- * $WIZARD_LIST = {
- * "i2c_backend" : ["I2C_BACKEND_BUILTIN", "I2C_BACKEND_BITBANG"]
- * }
+ * $WIZ$ i2c_backend = "I2C_BACKEND_BUILTIN", "I2C_BACKEND_BITBANG"
  */
 #define I2C_BACKEND_BUILTIN 0 ///< Uses cpu builtin i2c driver
 #define I2C_BACKEND_BITBANG 1 ///< Uses emulated bitbang driver
  */
 #define I2C_BACKEND_BUILTIN 0 ///< Uses cpu builtin i2c driver
 #define I2C_BACKEND_BITBANG 1 ///< Uses emulated bitbang driver
index 70139e175a42ecffeaab1c192cf9d32cad567c70..3a160ea72d9130b09b3a0054fc14e44298243928 100644 (file)
  * \author Giovanni Bajo <rasky@develer.com>
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \author Giovanni Bajo <rasky@develer.com>
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "ntc",
- * "depends" : ["adc"],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "ntc"
+ * $WIZ$ module_depends = "adc"
  */
 
 #ifndef DRV_NTC_H
  */
 
 #ifndef DRV_NTC_H
index 1a1f186d4d8dd7a775e0eccf012bf730c005bc1a..0eab5c3966ed89634d33c95941aa55bd71fac062 100644 (file)
  * \version $Id: ft245rl.c 22301 2008-09-09 16:53:17Z batt $
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \version $Id: ft245rl.c 22301 2008-09-09 16:53:17Z batt $
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "pcf8574",
- * "depends" : ["i2c"],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "pcf8574"
+ * $WIZ$ module_depends = "i2c"
  */
 
 #ifndef DRV_PCF8574_H
  */
 
 #ifndef DRV_PCF8574_H
index e15f7d3d57b244774cbc28fd2c454bc4d9c5facc..465477a3551877c6f30a900296fe73da5a5292d4 100644 (file)
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "phase",
- * "depends" : ["timer"],
- * "configuration" : "bertos/cfg/cfg_phase.h"
+ * $WIZ$ module_name = "phase"
+ * $WIZ$ module_depends = "timer"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_phase.h"
  * }
  */
 
  * }
  */
 
index c7688f5829f876d4a5dfdb370ebaf9b00870e1b9..f03582142213a1402ea2a39c9fe88e137286c66d 100644 (file)
  * \author Francesco Sacchi <batt@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
  * \author Francesco Sacchi <batt@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "pwm",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_pwm.h"
- * }
+ * $WIZ$ module_name = "pwm"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_pwm.h"
  */
 
 #ifndef DRV_PWM_H
  */
 
 #ifndef DRV_PWM_H
index ef62201668d0804f90d43d0ef2feff838f40f593..cf705aaf86256c16f481e2b5f037675cbeec7ba6 100644 (file)
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
- * $WIZARD_MODULE = {
- * "name" : "ser",
- * "depends" : ["kfile", "timer"],
- * "configuration" : "bertos/cfg/cfg_ser.h"
- * }
+ * $WIZ$ module_name = "ser"
+ * $WIZ$ module_depends = "kfile", "timer"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_ser.h"
  */
 
 #ifndef DRV_SER_H
  */
 
 #ifndef DRV_SER_H
@@ -99,9 +97,7 @@
 /**
  * \name LSB or MSB first data order for SPI driver.
  *
 /**
  * \name LSB or MSB first data order for SPI driver.
  *
- * $WIZARD_LIST = {
- * "ser_order_bit" : ["SER_MSB_FIRST", "SER_LSB_FIRST"]
- * }
+ * $WIZ$ ser_order_bit = "SER_MSB_FIRST", "SER_LSB_FIRST"
  */
 #define SER_MSB_FIRST 0
 #define SER_LSB_FIRST 1
  */
 #define SER_MSB_FIRST 0
 #define SER_LSB_FIRST 1
index b2ebb622ea0ac17e4fea944a28e9d62ae4301516..c78e9a4fcc21873074512f7534f40df3f4aefee7 100644 (file)
  * \author Francesco Sacchi <batt@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
  * \author Francesco Sacchi <batt@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "spi_bitbang",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_spi_bitbang.h"
- * }
+ * $WIZ$ module_name = "spi_bitbang"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_spi_bitbang.h"
  */
 
 
  */
 
 
@@ -56,9 +53,7 @@
 /**
  * Define send and receive order bit.
  *
 /**
  * Define send and receive order bit.
  *
- * $WIZARD_LIST = {
- * "ordet_bit_list" : ["SPI_LSB_FIRST", "SPI_MSB_FIRST"]
- * }
+ * $WIZ$ ordet_bit_list = "SPI_LSB_FIRST", "SPI_MSB_FIRST"
  */
 #define SPI_LSB_FIRST 1
 #define SPI_MSB_FIRST 2
  */
 #define SPI_LSB_FIRST 1
 #define SPI_MSB_FIRST 2
index afa70d8bfb80c7c5dc4b7f6b8f56b25e2e537137..0756cf6b22f7e002809936ff2aabf8d7407842a0 100644 (file)
  * \author Simone Zinanni <s.zinanni@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
  * \author Simone Zinanni <s.zinanni@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "stepper",
- * "depends" : ["timer", "ramp"],
- * "configuration" : "bertos/cfg/cfg_stepper.h"
+ * $WIZ$ module_name = "stepper"
+ * $WIZ$ module_depends = "timer", "ramp"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_stepper.h"
  * }
  */
 
  * }
  */
 
index 9055274d59b3e161fbddd01490a651763ac5a87a..8e5f744917a12f7d7f2888433c42ae171e60ecac 100644 (file)
  * \author Giovanni Bajo <rasky@develer.com>
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \author Giovanni Bajo <rasky@develer.com>
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "thermo",
- * "depends" : ["timer", "ntc"],
- * "configuration" : "bertos/cfg/cfg_thermo.h"
+ * $WIZ$ module_name = "thermo"
+ * $WIZ$ module_depends = "timer", "ntc"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_thermo.h"
  * }
  */
 
  * }
  */
 
index 7d981ccd5b331e017aae4c92de05cf287f2f1dab..3b4ccc9e209f0b0414aeaa49addebf0869517767 100644 (file)
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
- * $WIZARD_MODULE = {
- * "name" : "timer",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_timer.h"
- * }
+ * $WIZ$ module_name = "timer"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_timer.h"
  */
 
 #ifndef DRV_TIMER_H
  */
 
 #ifndef DRV_TIMER_H
index e5a90e76efd04fa5235788e9a3c9d501fb987eb0..b6db12475a0861d251bf60c4b662f299653c7ae0 100644 (file)
  *
  * \brief Watchdog module, supplies a simple API to manage wdt on supported target.
  *
  *
  * \brief Watchdog module, supplies a simple API to manage wdt on supported target.
  *
- * $WIZARD_MODULE = {
- * "name" : "wdt",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_wdt.h"
- * }
+ * $WIZ$ module_name = "wdt"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_wdt.h"
  */
 
 #ifndef DRV_WDT_H
  */
 
 #ifndef DRV_WDT_H
index 3b7f5a920d7e96756840246c0e677d11a648e975..5d3ebc677a52cc2ada60d446d72d12f603fb4d4a 100644 (file)
  * \author Francesco Sacchi <batt@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
  * \author Francesco Sacchi <batt@develer.com>
  * \author Daniele Basile <asterix@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "kfile",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_kfile.h"
- * }
+ * $WIZ$ module_name = "kfile"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_kfile.h"
  */
 
 #ifndef KERN_KFILE_H
  */
 
 #ifndef KERN_KFILE_H
index 693cd72c76aaf4780397d389a201db4831acaa20..cb35af5d484d18cdd0bfd90827afe20240aa0c35 100644 (file)
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
- * $WIZARD_MODULE = {
- * "name" : "kernel",
- * "depends" : [],
- * "configuration" : "bertos/cfg/cfg_kern.h"
- * }
+ * $WIZ$ module_name = "kernel"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_kern.h"
  */
 
 #ifndef KERN_PROC_H
  */
 
 #ifndef KERN_PROC_H
index 7e1317d7995bc2d285c03a8451c04ba40bc8334d..0f26dd907ecac87a5250eee073864684a120edcd 100644 (file)
  *
  * \brief Basical functions to use pocketBus protocol.
  *
  *
  * \brief Basical functions to use pocketBus protocol.
  *
- * $WIZARD_MODULE = {
- * "name" : "pocketbus",
- * "depends" : ["rotating_hash", "kfile"],
- * "configuration" : "bertos/cfg/cfg_pocketbus.h"
- * }
+ * $WIZ$ module_name = "pocketbus"
+ * $WIZ$ module_depends = "rotating_hash", "kfile"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_pocketbus.h"
  */
 
 #ifndef NET_POCKETBUS_H
  */
 
 #ifndef NET_POCKETBUS_H
index 7cbc98bfd1f2a44a0eb70d09d705bbe1e0ebf96e..4e96a623b4508855cf57713dbf508f0d880cec42 100644 (file)
  *
  * \author Francesco Sacchi <batt@develer.com>
  *
  *
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "pocketcmd",
- * "depends" : ["timer", "pocketbus"],
- * "configuration" : ""
- * }
+ * $WIZ$ module_name = "pocketcmd"
+ * $WIZ$ module_depends = "timer", "pocketbus"
  */
 
 #ifndef NET_POCKETCMD_H
  */
 
 #ifndef NET_POCKETCMD_H
index 14f354e8c1100c0faca639de0be8d59300b507ac..8832530fc4b9b43824a8aa919ca2a37594814b3b 100644 (file)
  * \author Bernie Innocenti <bernie@codewiz.org>
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \author Bernie Innocenti <bernie@codewiz.org>
  * \author Francesco Sacchi <batt@develer.com>
  *
- * $WIZARD_MODULE = {
- * "name" : "xmodem",
- * "depends" : ["kfile"],
- * "configuration" : "bertos/cfg/cfg_xmodem.h"
- * }
+ * $WIZ$ module_name = "xmodem"
+ * $WIZ$ module_depends = "kfile"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_xmodem.h"
  */
 
 
  */
 
 
index ae400b512f576334a135a46542325c97a3ba3b79..33fc5aa4dced21abce038ee7358ca88b2ccab2da 100644 (file)
@@ -18,6 +18,9 @@ import shutil
 import const
 import DefineException
 
 import const
 import DefineException
 
+# Try to use the new parsing module for the module information and the define lists
+import newParser
+
 def isBertosDir(directory):
    return os.path.exists(directory + "/VERSION")
 
 def isBertosDir(directory):
    return os.path.exists(directory + "/VERSION")
 
@@ -165,6 +168,45 @@ def getInfos(definition):
     return D
 
 def loadModuleData(project):
     return D
 
 def loadModuleData(project):
+    moduleInfoDict = {}
+    listInfoDict = {}
+    configurationInfoDict = {}
+    for filename, path in findDefinitions("*.h", project):
+        commentList = newParser.getCommentList(open(path + "/" + filename, "r").read())
+        if len(commentList) > 0:
+            moduleInfo = {}
+            configurationInfo = {}
+            try:
+                toBeParsed, moduleDict = newParser.loadModuleDefinition(commentList[0])
+            except newParser.ParseError, err:
+                print "error in file %s. line: %d - statement %s" % (path + "/" + filename, err.line_number, err.line)
+                print err.args
+                print err.message
+                raise Exception
+            for module, information in moduleDict.items():
+                if "configuration" in information.keys() and len(information["configuration"]):
+                    configuration = moduleDict[module]["configuration"]
+                    configurationInfo[configuration] = loadConfigurationInfos(project.info("SOURCES_PATH") + "/" + configuration)
+            moduleInfoDict.update(moduleDict)
+            configurationInfoDict.update(configurationInfo)
+            if toBeParsed:
+                try:
+                    listDict = newParser.loadDefineLists(commentList[1:])
+                    listInfoDict.update(listDict)
+                except newParser.ParseError, err:
+                    print "error in file %s. line: %d - statement %s" % (path + "/" + filename, err.line_number, err.line)
+                    print err.args
+                    print err.message
+                    raise Exception
+    for filename, path in findDefinitions("*_" + project.info("CPU_INFOS")["TOOLCHAIN"] + ".h", project):
+        commentList = newParser.getCommentList(open(path + "/" + filename, "r").read())
+        listInfoDict.update(newParser.loadDefineLists(commentList))
+    project.setInfo("MODULES", moduleInfoDict)
+    project.setInfo("LISTS", listInfoDict)
+    project.setInfo("CONFIGURATIONS", configurationInfoDict)
+    
+
+def loadModuleData_old(project):
     """
     Loads all the module data, like module definition, list definition, and module configurations
     int the given BProject, using the SOURCES_PATH information from this as the base for find the
     """
     Loads all the module data, like module definition, list definition, and module configurations
     int the given BProject, using the SOURCES_PATH information from this as the base for find the
index 02035c79f8c9a4112b0041d4259963a68c2729d2..86aad567d11b449899366fa09bdafe20238dd9e9 100644 (file)
@@ -45,9 +45,10 @@ def loadModuleDefinition(first_comment):
             moduleDict[moduleDefinition["module_name"]]["configuration"] = ""
         if "module_description" in moduleDefinition.keys():
             moduleDict[moduleDefinition["module_name"]]["description"] = moduleDefinition["module_description"]
             moduleDict[moduleDefinition["module_name"]]["configuration"] = ""
         if "module_description" in moduleDefinition.keys():
             moduleDict[moduleDefinition["module_name"]]["description"] = moduleDefinition["module_description"]
+        moduleDict[moduleDefinition["module_name"]]["enabled"] = False
     return toBeParsed, moduleDict
 
     return toBeParsed, moduleDict
 
-def loadDefineList(commentList):
+def loadDefineLists(commentList):
     defineList = {}
     for comment in commentList:
         for num, line in enumerate(comment):
     defineList = {}
     for comment in commentList:
         for num, line in enumerate(comment):
@@ -70,9 +71,15 @@ class ParseError(Exception):
 
 def main():
     try:
 
 def main():
     try:
+        defineLists = {}
+        modules = {}
         commentList = getCommentList(open("test/to_parse.h", "r").read())
         commentList = getCommentList(open("test/to_parse.h", "r").read())
-        print loadModuleDefinition(commentList[0])
-        print loadDefineList(commentList[1:])
+        toBeParsedm, moduleInfo = loadModuleDefinition(commentList[0])
+        modules.update(moduleInfo)
+        if toBeParsed:
+            defineLists.update(loadDefineList(commentList[1:]))
+        print modules
+        print defineLists
     except ParseError, err:
         print "Error: line %d - %s" % (err.line_number, err.line)
 
     except ParseError, err:
         print "Error: line %d - %s" % (err.line_number, err.line)