Reload feature for classic timers, to be tested.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14441 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-05-29 17:59:39 +00:00
parent b143106fe1
commit d71fe57da8
1 changed files with 5 additions and 0 deletions

View File

@ -406,6 +406,11 @@ void chVTDoTickI(void) {
chSysUnlockFromISR();
vtp->func(vtp, vtp->par);
chSysLockFromISR();
/* If a reload is defined the timer needs to be restarted.*/
if (vtp->reload > (sysinterval_t)0) {
ch_dlist_insert(&vtlp->dlist, &vtp->dlist, vtp->reload);
}
}
}
#else /* CH_CFG_ST_TIMEDELTA > 0 */