Restored old vt_storm.c without reloads.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14341 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
f506bdca05
commit
32b5cd534e
|
@ -86,27 +86,44 @@ static void sweeper0_cb(void *p) {
|
|||
|
||||
chSysLockFromISR();
|
||||
chVTSetI(&wrapper, (sysinterval_t)-1, wrapper_cb, NULL);
|
||||
chVTSetI(&sweeper0, delay, sweeper0_cb, NULL);
|
||||
chSysUnlockFromISR();
|
||||
}
|
||||
|
||||
static void sweeperm1_cb(void *p) {
|
||||
|
||||
(void)p;
|
||||
|
||||
chSysLockFromISR();
|
||||
chVTSetI(&sweeperm1, delay - 1, sweeperm1_cb, NULL);
|
||||
chSysUnlockFromISR();
|
||||
}
|
||||
|
||||
static void sweeperp1_cb(void *p) {
|
||||
|
||||
(void)p;
|
||||
|
||||
chSysLockFromISR();
|
||||
chVTSetI(&sweeperp1, delay + 1, sweeperp1_cb, NULL);
|
||||
chSysUnlockFromISR();
|
||||
}
|
||||
|
||||
static void sweeperm3_cb(void *p) {
|
||||
|
||||
(void)p;
|
||||
|
||||
chSysLockFromISR();
|
||||
chVTSetI(&sweeperm3, delay - 3, sweeperm3_cb, NULL);
|
||||
chSysUnlockFromISR();
|
||||
}
|
||||
|
||||
static void sweeperp3_cb(void *p) {
|
||||
|
||||
(void)p;
|
||||
|
||||
chSysLockFromISR();
|
||||
chVTSetI(&sweeperp3, delay + 3, sweeperp3_cb, NULL);
|
||||
chSysUnlockFromISR();
|
||||
}
|
||||
|
||||
/*===========================================================================*/
|
||||
|
@ -165,11 +182,11 @@ void vt_storm_execute(const vt_storm_config_t *cfg) {
|
|||
/* Starting sweepers.*/
|
||||
chSysLock();
|
||||
chVTSetI(&watchdog, TIME_MS2I(501), watchdog_cb, NULL);
|
||||
chVTSetContinuousI(&sweeper0, delay, sweeper0_cb, NULL);
|
||||
chVTSetContinuousI(&sweeperm1, delay - 1, sweeperm1_cb, NULL);
|
||||
chVTSetContinuousI(&sweeperp1, delay + 1, sweeperp1_cb, NULL);
|
||||
chVTSetContinuousI(&sweeperm3, delay - 3, sweeperm3_cb, NULL);
|
||||
chVTSetContinuousI(&sweeperp3, delay + 3, sweeperp3_cb, NULL);
|
||||
chVTSetI(&sweeper0, delay, sweeper0_cb, NULL);
|
||||
chVTSetI(&sweeperm1, delay - 1, sweeperm1_cb, NULL);
|
||||
chVTSetI(&sweeperp1, delay + 1, sweeperp1_cb, NULL);
|
||||
chVTSetI(&sweeperm3, delay - 3, sweeperm3_cb, NULL);
|
||||
chVTSetI(&sweeperp3, delay + 3, sweeperp3_cb, NULL);
|
||||
chVTSetI(&wrapper, (sysinterval_t) - 1, wrapper_cb, NULL);
|
||||
|
||||
/* Letting them run for half second.*/
|
||||
|
|
Loading…
Reference in New Issue