git.droids-corp.org
/
protos
/
rc_servos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0507a9f
)
blink led at startup
author
Olivier Matz
<zer0@droids-corp.org>
Tue, 8 Oct 2013 20:38:05 +0000
(22:38 +0200)
committer
Olivier Matz
<zer0@droids-corp.org>
Tue, 8 Oct 2013 20:38:25 +0000
(22:38 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
929ff13
..
e434690
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;