aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-10-11 22:01:45 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-10-12 11:59:27 -0400
commit744c6d114e3681a2e8cfcd4475424a7d19774d52 (patch)
treee6461641b82cf0a59fe99e171a69343fcda1b78b /src/avr
parent3b9b4e4d6f68216470bcb86070033a26a3562e23 (diff)
downloadkutter-744c6d114e3681a2e8cfcd4475424a7d19774d52.tar.gz
kutter-744c6d114e3681a2e8cfcd4475424a7d19774d52.tar.xz
kutter-744c6d114e3681a2e8cfcd4475424a7d19774d52.zip
sched: Don't shutdown on a "timer in the past" if already shutdown
A shutdown will not help if the mcu is already in a shutdown state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr')
-rw-r--r--src/avr/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/avr/timer.c b/src/avr/timer.c
index e40007d8..dcd01869 100644
--- a/src/avr/timer.c
+++ b/src/avr/timer.c
@@ -195,7 +195,7 @@ ISR(TIMER1_COMPA_vect)
irq_disable();
uint16_t now = timer_get();
if ((int16_t)(next - now) < (int16_t)(-timer_from_us(1000)))
- shutdown("Rescheduled timer in the past");
+ try_shutdown("Rescheduled timer in the past");
if (sched_tasks_busy()) {
timer_repeat_set(now + TIMER_REPEAT_TICKS);
next = now + TIMER_DEFER_REPEAT_TICKS;