Permalink
Browse files

blink the LED (toggle each infDisp packet)

  • Loading branch information...
1 parent a221923 commit 08c14e7fe78480bf1973dd1a24cb2fed8f5e37c7 @tz1 committed May 6, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 bluev_sketch/bluevirq.c
View
@@ -193,6 +193,7 @@ static void dostate(unsigned char val)
OCR4B = OCR4A + BITTIME(10) + BITTIME(1) / 2;
TIFR4 |= _BV(OCF4B); /* clear compare match interrupt */
TIMSK4 |= _BV(OCIE4B); /* enable compare match interrupt */
+ PORTB ^= _BV(PB7);
return;
}
if (thislen > 6 + infDisp[4]) // too long
@@ -260,6 +261,7 @@ void hwsetup()
cli();
v1state = inmsgstate = inmsglen = polarity = bitcnt = 0;
+ DDRB = _BV(PB7); // PB7/LED
// UART init
#include <util/setbaud.h>
UBRR2H = UBRR1H = UBRR0H = UBRRH_VALUE;

0 comments on commit 08c14e7

Please sign in to comment.