/**
* 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
/**
* 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
* 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
/**
* 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
/**
* Number of the DC motors to mange.
*
- * $WIZARD = { "type" : "int", "min": "0" }
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
*/
#define CONFIG_NUM_DC_MOTOR 1
#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 */
#ifndef CFG_I2C_H
#define CFG_I2C_H
-/// Comunication frequency. $WIZARD = { "type" : "int" }
+/**
+*Comunication frequency.
+*
+* $WIZ$ type = "int"
+*/
#define CONFIG_I2C_FREQ 100000UL
/**
* the twi_start should try to get an ACK before
* returning error.
*
- * $WIZARD = { "type" : "int" }
+ * $WIZ$ type = "int"
*/
#define CONFIG_I2C_START_TIMEOUT 100
* 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
/**
* 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
/**
* 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
#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 */
#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 */
#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 */
#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 */
/**
* 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
-/**
+$WIZ$ /**
* \file
* <!--
* This file is part of BeRTOS.
* \note Floating point operations will be always done within ramp_compute() to
* precalculate values, so there has to be at least a floating point emulation support.
*
- * $WIZARD = { "type" : "boolean" }
+ * $WIZ$ type = "boolean"
*/
#define RAMP_USE_FLOATING_POINT 0
* a runtime assertion.
*
* \note This macro is used only for the fixed-point version of the ramp.
- * $WIZARD = { "type" : "int", "min" : "0", "max" : "32" }
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ * $WIZ$ max = "32"
*/
#define RAMP_CLOCK_SHIFT_PRECISION 2
#endif
-///< Negative pulse width for ramp. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+* Negative pulse width for ramp.
+* $WIZ$ type = "int"
+* $WIZ$ min = "0"
+*/
#define RAMP_PULSE_WIDTH 50
- /*
- * Default ramp
- */
-#define RAMP_DEF_TIME 6000000UL ///< microsecs. $WIZARD = { "type" : "int" }
-#define RAMP_DEF_MAXFREQ 5000 ///< Hz. $WIZARD = { "type" : "int", "min" : "0" }
-#define RAMP_DEF_MINFREQ 200 ///< Hz. $WIZARD = { "type" : "int", "min" : "0" }
-#define RAMP_DEF_POWERRUN 10 ///< 10 deciampere (1 ampere). $WIZARD = { "type" : "int", "min" : "0" }
-#define RAMP_DEF_POWERIDLE 1 ///< 1 deciampere. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+ * Default ramp time (microsecs).
+ * $WIZ$ type = "int"
+ */
+#define RAMP_DEF_TIME 6000000UL
+/**
+ * Default ramp maxfreq (Hz).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
+#define RAMP_DEF_MAXFREQ 5000
+/**
+ * Default ramp minfreq (Hz).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
+#define RAMP_DEF_MINFREQ 200
+/**
+ * Default ramp powerrun (deciampere).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
+#define RAMP_DEF_POWERRUN 10
+/**
+ * Default ramp poweridle (Hz).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
+#define RAMP_DEF_POWERIDLE 1
#endif /* CFG_RAMP_H */
#define CFG_RANDPOOL_H
-/// Define a size, in byte, of entropy pool. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+ * Define a size, in byte, of entropy pool.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
#define CONFIG_SIZE_ENTROPY_POOL 64
-/// Turn on or off timer support in Randpool. $WIZARD = { "type" : "boolean" }
+/// Turn on or off timer support in Randpool. $WIZ$ type = "boolean"
#define CONFIG_RANDPOOL_TIMER 1
#endif /* CFG_RANDPOOL_H */
* Edit these define for your project.
*/
-/// Serial port settings. $WIZARD = { "type" : "int" }
+/// Serial port settings. $WIZ$ type = "int"
#define CONFIG_SER_PORT 0
-/// Serial port baudrate. $WIZARD = { "type" : "int" }
+/// Serial port baudrate. $WIZ$ type = "int"
#define CONFIG_SER_BAUDRATE 115200UL
-/// Spi port settings. $WIZARD = { "type" : "int" }
+/// Spi port settings. $WIZ$ type = "int"
#define CONFIG_SPI_PORT 0
-/// Spi port baudrate. $WIZARD = { "type" : "int" }
+/// Spi port baudrate. $WIZ$ type = "int"
#define CONFIG_SPI_BAUDRATE 5000000UL
-/// [bytes] Size of the outbound FIFO buffer for port 0. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the outbound FIFO buffer for port 0. $WIZ$ type = "int"
#define CONFIG_UART0_TXBUFSIZE 32
-/// [bytes] Size of the inbound FIFO buffer for port 0. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the inbound FIFO buffer for port 0. $WIZ$ type = "int"
#define CONFIG_UART0_RXBUFSIZE 32
-/// [bytes] Size of the outbound FIFO buffer for port 1. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the outbound FIFO buffer for port 1. $WIZ$ type = "int"
#define CONFIG_UART1_TXBUFSIZE 32
-/// [bytes] Size of the inbound FIFO buffer for port 1. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the inbound FIFO buffer for port 1. $WIZ$ type = "int"
#define CONFIG_UART1_RXBUFSIZE 32
-/// [bytes] Size of the outbound FIFO buffer for SPI port (AVR only). $WIZARD = { "type" : "int" }
+/// [bytes] Size of the outbound FIFO buffer for SPI port (AVR only). $WIZ$ type = "int"
#define CONFIG_SPI_TXBUFSIZE 32
-/// [bytes] Size of the inbound FIFO buffer for SPI port (AVR only). $WIZARD = { "type" : "int" }
+/// [bytes] Size of the inbound FIFO buffer for SPI port (AVR only). $WIZ$ type = "int"
#define CONFIG_SPI_RXBUFSIZE 32
-/// [bytes] Size of the outbound FIFO buffer for SPI port 0. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the outbound FIFO buffer for SPI port 0. $WIZ$ type = "int"
#define CONFIG_SPI0_TXBUFSIZE 32
-/// [bytes] Size of the inbound FIFO buffer for SPI port 0. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the inbound FIFO buffer for SPI port 0. $WIZ$ type = "int"
#define CONFIG_SPI0_RXBUFSIZE 32
-/// [bytes] Size of the outbound FIFO buffer for SPI port 1. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the outbound FIFO buffer for SPI port 1. $WIZ$ type = "int"
#define CONFIG_SPI1_TXBUFSIZE 32
-/// [bytes] Size of the inbound FIFO buffer for SPI port 1. $WIZARD = { "type" : "int" }
+/// [bytes] Size of the inbound FIFO buffer for SPI port 1. $WIZ$ type = "int"
#define CONFIG_SPI1_RXBUFSIZE 32
/**
* SPI data order (AVR only).
*
- * $WIZARD = {
- * "type" : "enum",
- * "value_list" : "ser_order_bit"
- * }
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "ser_order_bit"
*/
#define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST
-/// SPI clock division factor (AVR only). $WIZARD = { "type" : "int" }
+/// SPI clock division factor (AVR only). $WIZ$ type = "int"
#define CONFIG_SPI_CLOCK_DIV 16
/**
* SPI clock polarity: normal low or normal high (AVR only).
- * $WIZARD = {
- * "type" : "enum",
- * "value_list" : "ser_spi_pol"
- * }
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "ser_spi_pol"
*/
#define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW
/**
* SPI clock phase you can choose sample on first edge or
* sample on second clock edge (AVR only)
- * $WIZARD = {
- * "type" : "enum",
- * "value_list" : "ser_spi_phase"
- * }
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "ser_spi_phase"
*/
#define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE
-/// Default transmit timeout (ms). Set to -1 to disable timeout support. $WIZARD = { "type" : "int" }
+/// Default transmit timeout (ms). Set to -1 to disable timeout support. $WIZ$ type = "int"
#define CONFIG_SER_TXTIMEOUT -1
-/// Default receive timeout (ms). Set to -1 to disable timeout support. $WIZARD = { "type" : "int" }
+/// Default receive timeout (ms). Set to -1 to disable timeout support. $WIZ$ type = "int"
#define CONFIG_SER_RXTIMEOUT -1
-/// Use RTS/CTS handshake. $WIZARD = { "type" : "boolean" }
+/// Use RTS/CTS handshake. $WIZ$ type = "boolean"
#define CONFIG_SER_HWHANDSHAKE 0
-/// Default baud rate (set to 0 to disable). $WIZARD = { "type" : "boolean" }
+/// Default baud rate (set to 0 to disable). $WIZ$ type = "boolean"
#define CONFIG_SER_DEFBAUDRATE 0
-/// Enable ser_gets() and ser_gets_echo(). $WIZARD = { "type" : "boolean" }
+/// Enable ser_gets() and ser_gets_echo(). $WIZ$ type = "boolean"
#define CONFIG_SER_GETS 0
-/// Enable second serial port in emulator. $WIZARD = { "type" : "boolean" }
+/// Enable second serial port in emulator. $WIZ$ type = "boolean"
#define CONFIG_EMUL_UART1 0
-/// For serial debug. $WIZARD = { "type" : "boolean" }
+/// For serial debug. $WIZ$ type = "boolean"
#define CONFIG_SER_STROBE 0
#endif /* CFG_SER_H */
/**
* Set data order for emulated SPI.
*
- * $WIZARD = {
- * "type" : "enum",
- * "value_list" : "ordet_bit_list"
- * }
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "ordet_bit_list"
*/
#define CONFIG_SPI_DATAORDER SPI_LSB_FIRST
#ifndef CFG_STEPPER_H
#define CFG_STEPPER_H
-/// Module logging level. $WIZARD = { "type" : "enum", "value_list" : "log_level" }
+/**
+ * Module logging level.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
#define STEPPER_LOG_LEVEL LOG_LVL_INFO
-/// Module logging format. $WIZARD = { "type" : "enum", "value_list" : "log_format" }
+/**
+ * Module logging format.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
#define STEPPER_LOG_FORMAT LOG_FMT_TERSE
-/// Max number of the stepper motor. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+ * Max number of the stepper motor.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
#define CONFIG_NUM_STEPPER_MOTORS 6
-/// Max number of the timer usable on target to drive stepper motor. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+ * Max number of the timer usable on target to drive stepper motor.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
#define CONFIG_TC_STEPPER_MAX_NUM 6
#endif /* CFG_STEPPER_H */
#ifndef CFG_THERMO_H
#define CFG_THERMO_H
-/// Interval at which thermo control is performed. $WIZARD = { "type" : "int" }
+/// Interval at which thermo control is performed. $WIZ$ type = "int"
#define CONFIG_THERMO_INTERVAL_MS 100
/**
* Number of different samples we interpolate over to get the hifi temperature.
*
- * $WIZARD = { "type" : "int" }
+ * $WIZ$ type = "int"
*/
#define CONFIG_THERMO_HIFI_NUM_SAMPLES 10
* \version $Id$
*
* \author Daniele Basile <asterix@develer.com>
- * $WIZ$
*/
#ifndef CFG_TIMER_H
#define CFG_TIMER_H
/**
- *
- * $WIZ$ timer_select = "TIMER_DEFAULT"
+ * Hardware timer selection for drv/timer.c.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "timer_select"
*/
-
-/// Hardware timer selection for drv/timer.c. $WIZARD = { "type" : "enum", "value_list" : "timer_select" }
#define CONFIG_TIMER TIMER_DEFAULT
-/// Debug timer interrupt using a strobe pin. $WIZARD = { "type" : "boolean" }
+/**
+ * Debug timer interrupt using a strobe pin.
+ * $WIZ$ type = "boolean"
+ */
#define CONFIG_TIMER_STROBE 0
-/// Enable asynchronous timers. $WIZARD = { "type" : "boolean" }
+/**
+ * Enable asynchronous timers.
+ * $WIZ$ type = "boolean"
+ */
#define CONFIG_TIMER_EVENTS 1
-/// Support hi-res timer_usleep(). $WIZARD = { "type" : "boolean" }
+/**
+ * Support hi-res timer_usleep().
+ * $WIZ$ type = "boolean"
+ */
#define CONFIG_TIMER_UDELAY 1
#endif /* CFG_TIMER_H */
#ifndef CFG_WDT_H
#define CFG_WDT_H
-/// Enable watchdog timer. $WIZARD = { "type" : "boolean" }
+/// Enable watchdog timer. $WIZ$ type = "boolean"
#define CONFIG_WATCHDOG 0
#endif /* CFG_WDT_H */
#ifndef CFG_XMODEM_H
#define CFG_XMODEM_H
-/// Enable Rx. $WIZARD = { "type" : "boolean" }
+/// Enable Rx. $WIZ$ type = "boolean"
#define CONFIG_XMODEM_RECV 1
-/// Enable TX. $WIZARD = { "type" : "boolean" }
+/// Enable TX. $WIZ$ type = "boolean"
#define CONFIG_XMODEM_SEND 1
-/// Allow a Rx/Tx of 1Kbyte block. $WIZARD = { "type" : "boolean" }
+/// Allow a Rx/Tx of 1Kbyte block. $WIZ$ type = "boolean"
#define CONFIG_XMODEM_1KCRC 1
-/// Max retries before giving up. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+ * Max retries before giving up.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
#define CONFIG_XMODEM_MAXRETRIES 15
-/// Max retries before switching to BCC. $WIZARD = { "type" : "int", "min" : "0" }
+/**
+ * Max retries before switching to BCC.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
#define CONFIG_XMODEM_MAXCRCRETRIES 7
#endif /* CFG_XMODEM_H */
listInfosDict.update(listInfos)
for configuration in configurationInfos.keys():
configurationsInfoDict[configuration] = loadConfigurationInfos(project.info("SOURCES_PATH") + "/" + configuration)
- print "*_" + project.info("CPU_INFOS")["TOOLCHAIN"] + ".h"
for filename, path in findDefinitions("*_" + project.info("CPU_INFOS")["TOOLCHAIN"] + ".h", project):
listInfosDict.update(loadDefineLists(path + "/" + filename))
project.setInfo("MODULES", moduleInfosDict)
return text.strip(), {}
def loadConfigurationInfos(path):
+ """
+ Return the module configurations found in the given file as a dict with the
+ parameter name as key and a dict containig the fields above as value:
+ "value": the value of the parameter
+ "description": the description of the parameter
+ "informations": a dict containig optional informations:
+ "type": "int" | "boolean" | "enum"
+ "min": the minimum value for integer parameters
+ "max": the maximum value for integer parameters
+ "long": boolean indicating if the num is a long
+ "value_list": the name of the enum for enum parameters
+ """
+ try:
+ configurationInfos = {}
+ for comment, define in newParser.getDefinitionBlocks(open(path, "r").read()):
+ name, value = formatParamNameValue(define)
+ description, informations = newParser.getDescriptionInformations(comment)
+ configurationInfos[name] = {}
+ configurationInfos[name]["value"] = value
+ configurationInfos[name]["informations"] = informations
+ if ("type" in configurationInfos[name]["informations"].keys() and
+ configurationInfos[name]["informations"]["type"] == "int" and
+ configurationInfos[name]["value"].find("L") != -1):
+ configurationInfos[name]["informations"]["long"] = True
+ configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("L", "")
+ if ("type" in configurationInfos[name]["informations"].keys() and
+ configurationInfos[name]["informations"]["type"] == "int" and
+ configurationInfos[name]["value"].find("U") != -1):
+ configurationInfos[name]["informations"]["unsigned"] = True
+ configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("U", "")
+ configurationInfos[name]["description"] = description
+ return configurationInfos
+ except newParser.ParseError, err:
+ print "error in file %s. line: %d - statement %s" % (path, err.line_number, err.line)
+ print err.args
+ print err.message
+ raise Exception
+
+def loadConfigurationInfos_old(path):
"""
Return the module configurations found in the given file as a dict with the
parameter name as key and a dict containig the fields above as value:
defineList[key] = (value,)
return defineList
+def getDescriptionInformations(comment):
+ """
+ Take the doxygen comment and strip the wizard informations, returning the tuple
+ (comment, wizard_information)
+ """
+ description = ""
+ information = {}
+ for num, line in enumerate(comment):
+ index = line.find("$WIZ$")
+ if index != -1:
+ description += " " + line[:index]
+ try:
+ exec line[index + len("$WIZ$ "):] in {}, information
+ except:
+ raise ParseError(num, line[index:])
+ else:
+ description += " " + line
+ return description.strip(), information
+
+def getDefinitionBlocks(text):
+ """
+ Take a text and return a list of tuple (description, name-value).
+ """
+ block = []
+ block_tmp = re.findall(r"/\*{2}\s*([^*]*\*(?:[^/*][^*]*\*+)*)/\s*#define\s+((?:[^/]*?/?)+)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE)
+ for comment, define in block_tmp:
+ # Only the first element is needed
+ block.append(([re.findall(r"^\s*\* *(.*?)$", line, re.MULTILINE)[0] for line in comment.splitlines()], define))
+ for comment, define in re.findall(r"/{3}\s*([^<].*?)\s*#define\s+((?:[^/]*?/?)+)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE):
+ block.append(([comment], define))
+ for define, comment in re.findall(r"#define\s*(.*?)\s*/{3}<\s*(.+?)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE):
+ block.append(([comment], define))
+ print block
+ return block
+
class ParseError(Exception):
def __init__(self, line_number, line):
Exception.__init__(self)