From 4b3ac136e2d0ad9f1d1860b9ca1b355e242f0bb1 Mon Sep 17 00:00:00 2001 From: duplo Date: Mon, 16 Feb 2009 13:43:44 +0000 Subject: [PATCH] Change the syntax of the wizard tag also in the configuration files. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2348 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/cfg_adc.h | 18 ++++++----- bertos/cfg/cfg_battfs.h | 7 ++-- bertos/cfg/cfg_dataflash.h | 6 ++-- bertos/cfg/cfg_dc_motor.h | 3 +- bertos/cfg/cfg_flash25.h | 8 ++--- bertos/cfg/cfg_i2c.h | 20 +++++++----- bertos/cfg/cfg_kern.h | 27 +++++++++------- bertos/cfg/cfg_kfile.h | 8 +++-- bertos/cfg/cfg_md2.h | 8 +++-- bertos/cfg/cfg_ntc.h | 6 ++-- bertos/cfg/cfg_phase.h | 4 +-- bertos/cfg/cfg_pocketbus.h | 6 +++- bertos/cfg/cfg_pwm.h | 6 ++-- bertos/cfg/cfg_ramp.h | 51 ++++++++++++++++++++++------- bertos/cfg/cfg_randpool.h | 8 +++-- bertos/cfg/cfg_ser.h | 62 ++++++++++++++++-------------------- bertos/cfg/cfg_spi_bitbang.h | 6 ++-- bertos/cfg/cfg_stepper.h | 24 +++++++++++--- bertos/cfg/cfg_thermo.h | 4 +-- bertos/cfg/cfg_timer.h | 23 ++++++++----- bertos/cfg/cfg_wdt.h | 2 +- bertos/cfg/cfg_xmodem.h | 18 ++++++++--- wizard/bertos_utils.py | 40 ++++++++++++++++++++++- wizard/newParser.py | 35 ++++++++++++++++++++ 24 files changed, 276 insertions(+), 124 deletions(-) diff --git a/bertos/cfg/cfg_adc.h b/bertos/cfg/cfg_adc.h index 4a3fb2b3..0931b8c4 100644 --- a/bertos/cfg/cfg_adc.h +++ b/bertos/cfg/cfg_adc.h @@ -42,55 +42,57 @@ /** * Module logging level. * - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define ADC_LOG_LEVEL LOG_LVL_INFO /** * module logging format. * - * $WIZARD = { "type" : "enum", "value_list" : "log_format" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" */ #define ADC_LOG_FORMAT LOG_FMT_VERBOSE /** * Frequency clock for ADC conversion. * - * $WIZARD = { "type" : "int" } + * $WIZ$ type = "int" */ #define CONFIG_ADC_CLOCK 4800000UL /** * Minimum time for startup a conversion in micro second. * - * $WIZARD = { "type" : "int" } + * $WIZ$ type = "int" */ #define CONFIG_ADC_STARTUP_TIME 20 /** * Minimum time for sample and hold in nano second. * - * $WIZARD = { "type" : "int" } + * $WIZ$ type = "int" */ #define CONFIG_ADC_SHTIME 834 /** * ADC setting for AVR target. * - * $WIZARD = {"type" : "int" } + * $WIZ$ type = "int" */ #define CONFIG_ADC_AVR_REF 1 /* * ADC setting for AVR target. * - * $WIZARD = {"type" : "int" } + * $WIZ$ type = "int" */ #define CONFIG_ADC_AVR_DIVISOR 2 /** * Enable ADS strobe. * - * $WIZARD = {"type" : "boolean" } + * $WIZ$ type = "boolean" */ #define CONFIG_ADC_STROBE 0 diff --git a/bertos/cfg/cfg_battfs.h b/bertos/cfg/cfg_battfs.h index da7c22b4..a3f09e1d 100644 --- a/bertos/cfg/cfg_battfs.h +++ b/bertos/cfg/cfg_battfs.h @@ -43,14 +43,16 @@ /** * Module logging level. * - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define BATTFS_LOG_LEVEL LOG_LVL_INFO /** * module logging format. * - * $wizard = { "type" : "enum", "value_list" : "log_format" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" */ #define BATTFS_LOG_FORMAT LOG_FMT_VERBOSE @@ -58,6 +60,7 @@ * Set to 1 to enable free page shuffling: this * increase memories life but makes debugging * more difficult due to its unrepeteable state. + * $WIZ$ type = "boolean" */ #define CONFIG_BATTFS_SHUFFLE_FREE_PAGES 0 diff --git a/bertos/cfg/cfg_dataflash.h b/bertos/cfg/cfg_dataflash.h index e7a69383..8bd7828a 100644 --- a/bertos/cfg/cfg_dataflash.h +++ b/bertos/cfg/cfg_dataflash.h @@ -41,13 +41,15 @@ /** * Module logging level. - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define DATAFLASH_LOG_LEVEL LOG_LVL_INFO /** * Module logging format. - * $WIZARD = { "type" : "enum", "value_list" : "log_format" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" */ #define DATAFLASH_LOG_FORMAT LOG_FMT_TERSE diff --git a/bertos/cfg/cfg_dc_motor.h b/bertos/cfg/cfg_dc_motor.h index d69c25b2..631c15d7 100644 --- a/bertos/cfg/cfg_dc_motor.h +++ b/bertos/cfg/cfg_dc_motor.h @@ -43,7 +43,8 @@ /** * Number of the DC motors to mange. * - * $WIZARD = { "type" : "int", "min": "0" } + * $WIZ$ type = "int" + * $WIZ$ min = "0" */ #define CONFIG_NUM_DC_MOTOR 1 diff --git a/bertos/cfg/cfg_flash25.h b/bertos/cfg/cfg_flash25.h index 95a74e9f..d3f6f5ab 100644 --- a/bertos/cfg/cfg_flash25.h +++ b/bertos/cfg/cfg_flash25.h @@ -41,13 +41,11 @@ #define CFG_FLASH25_H /** + * Eeprom memory type. * - * $WIZARD = { - * "type" : "enum", - * "value_list" : "flash25_list" - * } + *$WIZ$ type = "enum", + *$WIZ$ value_list = "flash25_list" */ -/// Eeprom memory type. #define CONFIG_FLASH25 FLASH25_AT25F2048 #endif /* CFG_FALSH25_H */ diff --git a/bertos/cfg/cfg_i2c.h b/bertos/cfg/cfg_i2c.h index dd490e8c..fffe23d5 100644 --- a/bertos/cfg/cfg_i2c.h +++ b/bertos/cfg/cfg_i2c.h @@ -40,7 +40,11 @@ #ifndef CFG_I2C_H #define CFG_I2C_H -/// Comunication frequency. $WIZARD = { "type" : "int" } +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ #define CONFIG_I2C_FREQ 100000UL /** @@ -48,7 +52,7 @@ * the twi_start should try to get an ACK before * returning error. * - * $WIZARD = { "type" : "int" } + * $WIZ$ type = "int" */ #define CONFIG_I2C_START_TIMEOUT 100 @@ -58,24 +62,24 @@ * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. * \see drv/i2c.h for more information. * - * $WIZARD = { - * "type" : "enum", - * "value_list" : "i2c_backend" - * } + * $WIZ$ type = "enum", + * $WIZ$ value_list = "i2c_backend" */ #define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN /** * Module logging level. * - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define I2C_LOG_LEVEL LOG_LVL_INFO /** * module logging format. * - * $WIZARD = { "type" : "enum", "value_list" : "log_format" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" */ #define I2C_LOG_FORMAT LOG_FMT_TERSE diff --git a/bertos/cfg/cfg_kern.h b/bertos/cfg/cfg_kern.h index 8bf4325f..dd987b93 100644 --- a/bertos/cfg/cfg_kern.h +++ b/bertos/cfg/cfg_kern.h @@ -42,37 +42,40 @@ /** * Enable the multithreading kernel. * - * $WIZARD = { "type" : "boolean" } + * $WIZ$ type = "boolean" */ #define CONFIG_KERN 1 -#define CONFIG_KERN_SCHED 1 ///< Process schedling. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_SIGNALS 1 ///< Inter-process signals. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_IRQ 0 ///< Interrupt supervisor. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_HEAP 0 ///< Dynamic memory allocation. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_SEMAPHORES 1 ///< Re-entrant mutual exclusion primitives. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_MONITOR 1 ///< Process monitor. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_PREEMPT 0 ///< Preemptive process scheduling. $WIZARD = { "type" : "boolean" } -#define CONFIG_KERN_PRI 0 ///< Priority-based scheduling policy. $WIZARD = { "type" : "boolean" } +#define CONFIG_KERN_SCHED 1 ///< Process schedling. $WIZ$ type = "boolean" +#define CONFIG_KERN_SIGNALS 1 ///< Inter-process signals. $WIZ$ type = "boolean" +#define CONFIG_KERN_IRQ 0 ///< Interrupt supervisor. $WIZ$ type = "boolean" +#define CONFIG_KERN_HEAP 0 ///< Dynamic memory allocation. $WIZ$ type = "boolean" +#define CONFIG_KERN_SEMAPHORES 1 ///< Re-entrant mutual exclusion primitives. $WIZ$ type = "boolean" +#define CONFIG_KERN_MONITOR 1 ///< Process monitor. $WIZ$ type = "boolean" +#define CONFIG_KERN_PREEMPT 0 ///< Preemptive process scheduling. $WIZ$ type = "boolean" +#define CONFIG_KERN_PRI 0 ///< Priority-based scheduling policy. $WIZ$ type = "boolean" /** * [ms] Time sharing quantum (a prime number prevents interference effects) * - * $WIZARD = { "type" : "int", "min" : "0" } + * $WIZ$ type = "int" + * $WIZ$ min = "0" */ #define CONFIG_KERN_QUANTUM 47 /** * Module logging level. * - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define KERN_LOG_LEVEL LOG_LVL_ERR /** * Module logging level. * - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define KERN_LOG_FORMAT LOG_FMT_VERBOSE diff --git a/bertos/cfg/cfg_kfile.h b/bertos/cfg/cfg_kfile.h index da5f5350..291a3881 100644 --- a/bertos/cfg/cfg_kfile.h +++ b/bertos/cfg/cfg_kfile.h @@ -41,19 +41,21 @@ /** * Module logging level. - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define KFILE_LOG_LEVEL LOG_LVL_INFO /** * Module logging format. - * $WIZARD = { "type" : "enum", "value_list" : "log_format" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" */ #define KFILE_LOG_FORMAT LOG_FMT_TERSE /** * Enable the gets function with echo. - * $WIZARD = { "type" : "boolean" } + * $WIZ$ type = "boolean" */ #define CONFIG_KFILE_GETS 0 diff --git a/bertos/cfg/cfg_md2.h b/bertos/cfg/cfg_md2.h index 3f891617..91edcef3 100644 --- a/bertos/cfg/cfg_md2.h +++ b/bertos/cfg/cfg_md2.h @@ -40,10 +40,14 @@ #ifndef CFG_MD2_H #define CFG_MD2_H -/// Size of block for MD2 algorithm. $WIZARD = { "type" : "int", "min" : "0" } +/** + * Size of block for MD2 algorithm. + * $WIZ$ type = "int" + * $WIZ$ min = "0" + */ #define CONFIG_MD2_BLOCK_LEN 16 -/// Use standard permutation in MD2 algorithm. $WIZARD = { "type" : "boolean" } +/// Use standard permutation in MD2 algorithm. $WIZ$ type = "boolean" #define CONFIG_MD2_STD_PERM 0 #endif /* CFG_MD2_H */ diff --git a/bertos/cfg/cfg_ntc.h b/bertos/cfg/cfg_ntc.h index 9566bd7f..28212204 100644 --- a/bertos/cfg/cfg_ntc.h +++ b/bertos/cfg/cfg_ntc.h @@ -39,9 +39,9 @@ #ifndef CFG_NTC_H #define CFG_NTC_H -///< Max value of the dsty cycle on triac. $WIZARD = { "type" : "int" } -#define NTC_OPEN_CIRCUIT -3s768 -///< Max value of the triac power. $WIZARD = { "type" : "int" } +/// Max value of the dsty cycle on triac. $WIZ$ type = "int" +#define NTC_OPEN_CIRCUIT -32768 +/// Max value of the triac power. $WIZ$ type = "int" #define NTC_SHORT_CIRCUIT 32767 #endif /* CFG_NTC_H */ diff --git a/bertos/cfg/cfg_phase.h b/bertos/cfg/cfg_phase.h index 53d94c0e..f77eec63 100644 --- a/bertos/cfg/cfg_phase.h +++ b/bertos/cfg/cfg_phase.h @@ -39,10 +39,10 @@ #ifndef CFG_PHASE_H #define CFG_PHASE_H -/// Max value of the duty cycle on triac. $WIZARD = { "type" : "int" } +/// Max value of the duty cycle on triac. $WIZ$ type = "int" #define CONFIG_TRIAC_MAX_DUTY 100 -/// Max value of the triac power. $WIZARD = { "type" : "int" } +/// Max value of the triac power. $WIZ$ type = "int" #define CONFIG_TRIAC_MAX_POWER 100 #endif /* CFG_PHASE_H */ diff --git a/bertos/cfg/cfg_pocketbus.h b/bertos/cfg/cfg_pocketbus.h index 47dfce88..263e32a7 100644 --- a/bertos/cfg/cfg_pocketbus.h +++ b/bertos/cfg/cfg_pocketbus.h @@ -40,7 +40,11 @@ #ifndef CFG_POCKETBUS_H #define CFG_POCKETBUS_H -/// Buffer len for pockebus protocol. $WIZARD = { "type" : "int", "min" : "0" } +/** + *Buffer len for pockebus protocol. + * $WIZ$ type = "int" + * $WIZ$ min = "0" + */ #define CONFIG_POCKETBUS_BUFLEN 128 #endif /* CFG_POCKETBUS_H */ diff --git a/bertos/cfg/cfg_pwm.h b/bertos/cfg/cfg_pwm.h index 03481086..6627ee2d 100644 --- a/bertos/cfg/cfg_pwm.h +++ b/bertos/cfg/cfg_pwm.h @@ -41,14 +41,16 @@ /** * Module logging level. * - * $WIZARD = { "type" : "enum", "value_list" : "log_level" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" */ #define PWM_LOG_LEVEL LOG_LVL_INFO /** * Module logging format. * - * $WIZARD = { "type" : "enum", "value_list" : "log_format" } + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" */ #define PWM_LOG_FORMAT LOG_FMT_VERBOSE diff --git a/bertos/cfg/cfg_ramp.h b/bertos/cfg/cfg_ramp.h index 9317d6ff..bcac1313 100644 --- a/bertos/cfg/cfg_ramp.h +++ b/bertos/cfg/cfg_ramp.h @@ -1,4 +1,4 @@ -/** +$WIZ$ /** * \file *