resources/libtiny/Servo.cpp
//=============================================================================
// FUNCTION:    void servoTimerSetup()
//
// DESCRIPTION: Sets up the timer used by this servo driver
//              No servo pulses can be generated until this function is called.
//
// INPUT:       Nothing
//
// RETURNS:     Nothing
//
//=============================================================================
void servoTimerSetup()
DESCRIPTION: Sets up the timer used by this servo driver
No servo pulses can be generated until this function is called.

Nothing

Nothing
void servoTimerSetup () DESCRIPTION : Sets up the timer used by this servo driver No servo pulses can be generated until this function is called . Nothing Nothing
void ServoSequencer::servoTimerSetup()
{
    setupTimerPrescaler();
    #ifdef __AVR_ATtinyX61__
    TCCR1A=0;
    #endif
    TIMSK |= (1 << OCIEnx);
    TCNTn  = 0;
    OCRnx = 255;
    sei();
}
void ServoSequencer :: servoTimerSetup ( ) { setupTimerPrescaler ( ) ; #ifdef __AVR_ATtinyX61__ TCCR1A = 0 ; #endif TIMSK |= ( 1 << OCIEnx ) ; TCNTn = 0 ; OCRnx = 255 ; sei ( ) ; }
FUNCTION:    void servoTimerSetup()
DESCRIPTION: Sets up the timer used by this servo driver
No servo pulses can be generated until this function is called.
FUNCTION : void servoTimerSetup () DESCRIPTION : Sets up the timer used by this servo driver No servo pulses can be generated until this function is called .
//set up the timer prescaler based on which timer was selected and our F_CPU clock // Enable Output Compare Match Interrupt //reset the counter to 0 //set the compare value to any number larger than 0 // Enable global interrupts /*
    TCNT0 - The Timer/Counter
    OCR0A and OCR0B - Output Compare Registers
    TIFR0 - Timer Interrupt Flag Register
    TIMSK - Timer Interrupt Mask Register
    TCCR0B Timer/Counter Control Register B
    */