Remote Library

Embed Size (px)

Citation preview

  • 7/23/2019 Remote Library

    1/1

    IRrecv::IRrecv (int recvpin){

    irparams.recvpin = recvpin;irparams.blinkflag = 0;

    }// initialization//void IRrecv::enableIRIn ( ){

    cli();// Setup pulse clock timer interrupt// Prescale /8 (16M/8 = 0.5 microseconds per tick)// Therefore, the timer interval can range from 0.5 to 128 microseconds// Depending on the reset value (255 to 0)TIMER_CONFIG_NORMAL();

    // Timer2 Overflow Interrupt EnableTIMER_ENABLE_INTR;

    TIMER_RESET;

    sei(); // enable interrupts

    // Initialize state machine variables

    irparams.rcvstate = STATE_IDLE;irparams.rawlen = 0;

    // Set pin modespinMode(irparams.recvpin, INPUT);

    }//