From 5dec35802d72ab8ed3e63a46b3ea8829a2c6a3bf Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Tue, 8 Oct 2013 22:38:05 +0200 Subject: [PATCH] blink led at startup --- main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 929ff13..e434690 100644 --- a/main.c +++ b/main.c @@ -244,6 +244,7 @@ int main(void) uint8_t i; uint8_t t, diff; uint8_t tmp; + uint8_t cnt = 10; /* use pull-up for inputs */ PORTC |= 0x3f; @@ -251,14 +252,15 @@ int main(void) /* LED */ DDRB = 0x02; -#if 0 /* LED debug */ - while (1) { + while (cnt > 0) { +#if 1 /* disable for LED debug only */ + cnt--; +#endif LED_ON(); wait_ms(100); LED_OFF(); wait_ms(100); } -#endif /* servo outputs PD2-PD7 */ DDRD = 0xfc; -- 2.39.5