summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/main.c b/firmware/main.c
index 5a863e9..db5bf25 100644
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -84,16 +84,17 @@ uchar i;
usbDeviceConnect();
TCCR0 = 5; /* set prescaler to 1/1024 */
usbInit();
+ PORTD = _BV(0); /* turn on power LED */
sei();
for(;;){ /* main event loop */
wdt_reset();
usbPoll();
if(TIFR & (1 << TOV0)){
TIFR |= 1 << TOV0; /* clear pending flag */
- /*
- * a periodic (low-frequency, low-accuracy) loop function can
- * be placed here.
- */
+ if (PINB & _BV(PB7))
+ PORTD = _BV(0); /* SCL high : turn on power LED */
+ else
+ PORTD = _BV(1); /* SCL low (busy) : turn on activity LED */
}
}
return 0;