]> git.droids-corp.org - protos/rc_servos.git/commitdiff
blink led at startup
authorOlivier Matz <zer0@droids-corp.org>
Tue, 8 Oct 2013 20:38:05 +0000 (22:38 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 8 Oct 2013 20:38:25 +0000 (22:38 +0200)
main.c

diff --git a/main.c b/main.c
index 929ff1371ebf69adfce4ceaac0da19c3c4de03e2..e434690b0d80b115296eb201e27d4621fd1a0e4b 100644 (file)
--- 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;