All pastes #772347 Raw Edit

Untitled

public c v1 · immutable
·published 2007-11-13 19:22 UTC
rendered paste body
int8_t lastSwitch=-1;SIGNAL(SIG_INTERRUPT0){        PORTB &=~(1<<PB0);        if(bit_is_set(PINA,PA0) || lastSwitch==0){                PORTD ^=(1<<PD5);                lastSwitch=0;        }        else if(bit_is_set(PINA,PA1) || lastSwitch==1){                PORTD ^=(1<<PD6);                lastSwitch=1;        }        else;}