#include "config.h" #include "Port.h" #include #define SET_LED() PORTB &= ~_BV(LEDPIN) #define CLR_LED() PORTB |= _BV(LEDPIN) #define DELAY_1S 15 void inline io_init(void) { PORTB |= _BV(LEDPIN); //HIGH DDRB |= _BV(LEDPIN); //OUTPUT } void inline timer0_init(void) { TCNT0 = 0; TCCR0 = _BV(CS02)|_BV(CS00); //FCLK i/o/1024 } void inline timer0_wait_overflow_clr(void) { loop_until_bit_is_set(TIFR,TOV0); //wait timer0 overflew TIFR |= _BV(TOV0); //clear overflew flag } void inline delay_1s(void) { uint8 i; for (i=0 ;i