Subversion Repositories HomeAutomation

Rev

Rev 1415 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1415 Rev 1468
Line 48... Line 48...
48
#define TIMER2_SET_PRESCALER_8()    TCCR2=(1<<WGM21)|2;
48
#define TIMER2_SET_PRESCALER_8()    TCCR2=(1<<WGM21)|2;
49
#define TIMER2_SET_PRESCALER_64()   TCCR2=(1<<WGM21)|4;
49
#define TIMER2_SET_PRESCALER_64()   TCCR2=(1<<WGM21)|4;
50
#define TIMER2_SET_PRESCALER_256()  TCCR2=(1<<WGM21)|6;
50
#define TIMER2_SET_PRESCALER_256()  TCCR2=(1<<WGM21)|6;
51
#define TIMER2_SET_PRESCALER_1024() TCCR2=(1<<WGM21)|7;
51
#define TIMER2_SET_PRESCALER_1024() TCCR2=(1<<WGM21)|7;
52
 
52
 
53
#elif defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)
53
#elif defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
54
#define TIMER0_MAX                  255
54
#define TIMER0_MAX                  255
55
#define TIMER0_VECTOR               TIMER0_COMPA_vect
55
#define TIMER0_VECTOR               TIMER0_COMPA_vect
56
#define TIMER0_COMPARE_REG          OCR0A
56
#define TIMER0_COMPARE_REG          OCR0A
57
#define TIMER0_INIT()               TCCR0A=(1<<WGM01);TIFR0=(1<<OCF0A);TIMSK0|=(1<<OCIE0A);
57
#define TIMER0_INIT()               TCCR0A=(1<<WGM01);TIFR0=(1<<OCF0A);TIMSK0|=(1<<OCIE0A);
58
#define TIMER0_SET_PRESCALER_1()    TCCR0B=1;
58
#define TIMER0_SET_PRESCALER_1()    TCCR0B=1;