All pastes #2101343 Raw Edit

Something

public text v1 · immutable
#2101343 ·published 2012-01-09 04:37 UTC
rendered paste body
void inputInterrupt() {

    if( P1IFG & BIT3 ) {

        if( lastInputTimer < 0 || lastInputTimer > 1 ) {

            //if( !(P1IN & BIT3) ) {

                nightMode ^= 1;
                if( nightMode )
                    P1OUT |= BIT0;
                else
                    P1OUT &= ~BIT0;
            //}
        }

        lastInputTimer = -1;
    }

    do {
        P1IFG = 0;
    } while( P1IFG != 0 );
}