Conflicts:
	IRremoteInt.h
This commit is contained in:
Ken Shirriff
2012-08-05 23:46:35 -07:00

View File

@@ -17,9 +17,9 @@
#define IRremoteint_h #define IRremoteint_h
#if defined(ARDUINO) && ARDUINO >= 100 #if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h" #include <Arduino.h>
#else #else
#include "WProgram.h" #include <WProgram.h>
#endif #endif
// define which timer to use // define which timer to use
@@ -57,6 +57,10 @@
//#define IR_USE_TIMER1 // tx = pin 13 //#define IR_USE_TIMER1 // tx = pin 13
#define IR_USE_TIMER2 // tx = pin 14 #define IR_USE_TIMER2 // tx = pin 14
// Atmega8
#elif defined(__AVR_ATmega8P__) || defined(__AVR_ATmega8__)
#define IR_USE_TIMER1 // tx = pin 9
// Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, etc // Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, etc
#else #else
//#define IR_USE_TIMER1 // tx = pin 9 //#define IR_USE_TIMER1 // tx = pin 9
@@ -237,8 +241,13 @@ extern volatile irparams_t irparams;
#define TIMER_RESET #define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR1A |= _BV(COM1A1)) #define TIMER_ENABLE_PWM (TCCR1A |= _BV(COM1A1))
#define TIMER_DISABLE_PWM (TCCR1A &= ~(_BV(COM1A1))) #define TIMER_DISABLE_PWM (TCCR1A &= ~(_BV(COM1A1)))
#define TIMER_ENABLE_INTR (TIMSK1 = _BV(OCIE1A)) #if defined(__AVR_ATmega8P__) || defined(__AVR_ATmega8__)
#define TIMER_DISABLE_INTR (TIMSK1 = 0) #define TIMER_ENABLE_INTR (TIMSK = _BV(OCIE1A))
#define TIMER_DISABLE_INTR (TIMSK = 0)
#else
#define TIMER_ENABLE_INTR (TIMSK1 = _BV(OCIE1A))
#define TIMER_DISABLE_INTR (TIMSK1 = 0)
#endif
#define TIMER_INTR_NAME TIMER1_COMPA_vect #define TIMER_INTR_NAME TIMER1_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \ #define TIMER_CONFIG_KHZ(val) ({ \
const uint16_t pwmval = SYSCLOCK / 2000 / (val); \ const uint16_t pwmval = SYSCLOCK / 2000 / (val); \