aboutsummaryrefslogtreecommitdiff
path: root/kernel/heartbeat.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/heartbeat.c')
-rw-r--r--kernel/heartbeat.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/heartbeat.c b/kernel/heartbeat.c
index 64f3182..b562d26 100644
--- a/kernel/heartbeat.c
+++ b/kernel/heartbeat.c
@@ -30,17 +30,19 @@ heartbeat(void *arg)
DDRB |= _BV(PIN);
PORTB &= ~_BV(PIN);
+ update(0, MSEC(750));
+
for (;;) {
- PORTB ^= _BV(PIN);
- snooze(MSEC(100));
+ PORTB |= _BV(PIN);
+ sleep(SOFT, MSEC(100));
- PORTB ^= _BV(PIN);
- snooze(MSEC(50));
+ PORTB &= ~_BV(PIN);
+ sleep(SOFT, MSEC(50));
- PORTB ^= _BV(PIN);
- snooze(MSEC(100));
+ PORTB |= _BV(PIN);
+ sleep(SOFT, MSEC(100));
- PORTB ^= _BV(PIN);
- period(MSEC(750));
+ PORTB &= ~_BV(PIN);
+ sleep(SOFT, MSEC(500));
}
}