Added VT_STORM_CFG_MIN_DELAY configuration option.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14407 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
35621dd185
commit
bd133fec8a
|
@ -190,11 +190,12 @@ void vt_storm_execute(const vt_storm_config_t *cfg) {
|
|||
chprintf(cfg->out, "*** Test Board: %s\r\n", BOARD_NAME);
|
||||
#endif
|
||||
chprintf(cfg->out, "***\r\n");
|
||||
chprintf(cfg->out, "*** Randomize: %d\r\n", VT_STORM_CFG_RANDOMIZE);
|
||||
chprintf(cfg->out, "*** System Time: %d\r\n", CH_CFG_ST_RESOLUTION);
|
||||
chprintf(cfg->out, "*** Intervals: %d\r\n", CH_CFG_INTERVALS_SIZE);
|
||||
chprintf(cfg->out, "*** SysTick: %d\r\n", CH_CFG_ST_FREQUENCY);
|
||||
chprintf(cfg->out, "*** Delta: %d\r\n", CH_CFG_ST_TIMEDELTA);
|
||||
chprintf(cfg->out, "*** Randomize: %d\r\n", VT_STORM_CFG_RANDOMIZE);
|
||||
chprintf(cfg->out, "*** Minimum Delay: %d\r\n", VT_STORM_CFG_MIN_DELAY);
|
||||
chprintf(cfg->out, "*** System Time: %d\r\n", CH_CFG_ST_RESOLUTION);
|
||||
chprintf(cfg->out, "*** Intervals: %d\r\n", CH_CFG_INTERVALS_SIZE);
|
||||
chprintf(cfg->out, "*** SysTick: %d\r\n", CH_CFG_ST_FREQUENCY);
|
||||
chprintf(cfg->out, "*** Delta: %d\r\n", CH_CFG_ST_TIMEDELTA);
|
||||
chprintf(cfg->out, "\r\n");
|
||||
|
||||
for (i = 1; i <= VT_STORM_CFG_ITERATIONS; i++) {
|
||||
|
@ -241,7 +242,7 @@ void vt_storm_execute(const vt_storm_config_t *cfg) {
|
|||
palToggleLine(config->line);
|
||||
chprintf(cfg->out, ".");
|
||||
delay--;
|
||||
} while (delay >= 5);
|
||||
} while (delay >= VT_STORM_CFG_MIN_DELAY);
|
||||
|
||||
if (saturated) {
|
||||
chprintf(cfg->out, "\r\nSaturated at %u uS", TIME_I2US(delay));
|
||||
|
|
|
@ -50,12 +50,23 @@
|
|||
#if !defined(VT_STORM_CFG_ITERATIONS) || defined(__DOXYGEN__)
|
||||
#define VT_STORM_CFG_ITERATIONS 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Minimum delay for each iteration.
|
||||
*/
|
||||
#if !defined(VT_STORM_CFG_MIN_DELAY) || defined(__DOXYGEN__)
|
||||
#define VT_STORM_CFG_MIN_DELAY 10
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Derived constants and error checks. */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if (VT_STORM_CFG_MIN_DELAY < 5) || (VT_STORM_CFG_MIN_DELAY > 100)
|
||||
#error "invalid VT_STORM_CFG_MIN_DELAY value"
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module data structures and types. */
|
||||
/*===========================================================================*/
|
||||
|
|
Loading…
Reference in New Issue