Skip to content

Commit

Permalink
blink the LED (toggle each infDisp packet)
Browse files Browse the repository at this point in the history
  • Loading branch information
tz1 committed May 6, 2012
1 parent a221923 commit 08c14e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bluev_sketch/bluevirq.c
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 08c14e7

Please sign in to comment.