aboutsummaryrefslogtreecommitdiff
path: root/kernel/heartbeat.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2011-07-12 00:54:33 +0000
committerDimitri Sokolyuk <demon@dim13.org>2011-07-12 00:54:33 +0000
commitb4a9b392c57ca8b3f740dd3035b1f43b4ad583b4 (patch)
treeeeda7f987ad9abf16a5954ce250dc51cf0b1ac41 /kernel/heartbeat.c
parent42a1324ba256967ca11fa1a81ef3d2ac3d10c491 (diff)
add clock, redesign timer, tweak stack values
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));
}
}