From: Olivier Matz Date: Tue, 8 Oct 2013 20:38:05 +0000 (+0200) Subject: blink led at startup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5dec35802d72ab8ed3e63a46b3ea8829a2c6a3bf;p=protos%2Frc_servos.git blink led at startup --- 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;