AP_Bootloader: fixed sys lock for timer

This commit is contained in:
Andrew Tridgell 2019-02-07 08:40:18 +11:00
parent 1fa0a2eeca
commit 9013c15f4d
1 changed files with 2 additions and 2 deletions

View File

@ -130,9 +130,9 @@ volatile unsigned timer[NTIMERS];
*/
static void sys_tick_handler(void *ctx)
{
chSysLock();
chSysLockFromISR();
chVTSetI(&systick_vt, chTimeMS2I(1), sys_tick_handler, nullptr);
chSysUnlock();
chSysUnlockFromISR();
uint8_t i;
for (i = 0; i < NTIMERS; i++)
if (timer[i] > 0) {