--- a/blackbox/lowlevel.c Sat Dec 10 10:51:24 2011 +0100 +++ b/blackbox/lowlevel.c Sat Dec 10 14:12:09 2011 +0100 @@ -111,7 +111,7 @@ // setup data bit + carid timer TCCR2 = (1<<CS21) | (1<<WGM21); //divide by 8, set compare match OCR2 = TIMER2_50US; - TIMSK |= 1<<OCIE2; //enable timer2 interrupt + TIMSK |= _BV(OCIE2); //enable timer2 interrupt // enable carid interrupts MCUCR = _BV(ISC00) | _BV(ISC01) | _BV(ISC10) | _BV(ISC11); // INT0/1 rising edge @@ -123,7 +123,7 @@ TCCR1B = (1<<CS11) | (1<<WGM12); //divide by 8, set compare match (1mhz clock) OCR1A = TIMER1_500NS; //OCR1A = TIMER1_7500NS; - TIMSK |= 1<<OCIE1A; //enable timer1 interrupt + TIMSK |= _BV(OCIE1A); //enable timer1 interrupt RS232_puts_p(PSTR("FreeSlot Blackbox v")); RS232_puts(VERSION); @@ -133,7 +133,7 @@ -void check_rails_shortcut(void) { +uint8_t check_rails_shortcut(void) { // check for short circuit on the rails uint8_t i = 100; if ((PIN(RAIL_DETECT_PORT) & _BV(RAIL_DETECT)) == 0) { @@ -167,4 +167,5 @@ } } } + return 0; } \ No newline at end of file