29 #if defined (DOXYGEN) || !defined(ARDUINO) || defined ARDUINO_ARCH_AVR 34 #define ENABLE_PULL_UP 39 #define USE_PRESCALER_FACTOR_8 1 106 void dump(Stream &stream)
const;
109 void setup(
bool setup);
116 #if USE_PRESCALER_FACTOR_8 117 #define CAPTURE_PRESCALER_SETTING (_BV(CAT3(CS, CAP_TIM, 1))) 118 #define CAPTURE_PRESCALER_BITS (3) 120 #define CAPTURE_PRESCALER_SETTING (_BV(CAT3(CS, CAP_TIM, 0))) 121 #define CAPTURE_PRESCALER_BITS (0) 123 #define CAPTURE_PRESCALER_FACTOR (_BV(CAPTURE_PRESCALER_BITS)) 125 #if RANGE_EXTENSION_BITS > 8 139 #if defined(_AVR_IOM32U4_H_) 140 #ifndef ALTERNATE_PIN 146 #else // Alternate pin 152 #endif // ALTERNATE_PIN 153 #elif defined(_AVR_IOM2560_H_) 154 #ifndef ALTERNATE_PIN 160 #else // ALTERNATE_PIN 166 #endif // ALTERNATE_PIN 179 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) // clear bit 180 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) // set bit 181 #define __CAT2(base, portname) base##portname // internally needed by CAT2 182 #define CAT2(prefix, num) __CAT2(prefix, num) // build a define name from 2 params 183 #define __CAT3(prefix, num, postfix) prefix##num##postfix // internally needed by CAT3 184 #define CAT3(prefix, num, postfix) __CAT3(prefix, num, postfix) // build a define name from 3 params 189 #if defined(DEBUG_PIN) && defined(DEBUG_PORT) 190 CAT2(PIN, DEBUG_PORT) = _BV(DEBUG_PIN);
195 #if defined(DEBUG_PIN) && defined(DEBUG_PORT) 196 cbi(
CAT2(PORT, DEBUG_PORT), DEBUG_PIN);
208 #if (F_CPU % 8000000) == 0 210 #elif (F_CPU % 1000000) == 0 212 #elif (F_CPU % 115200) == 0 // serial bps rate compatible cpu clocks, e.g. 7372800 or 14745600 222 #endif // ARDUINO_ARCH_AVR bool timeouted
True if last receive ended with a timeout.
static const milliseconds_t defaultBeginningTimeout
uint16_t microseconds_t
Type for durations in micro seconds.
uint32_t frequency_t
Type for modulation frequency in Hz.
static const milliseconds_t defaultEndingTimeout
#define MICROSECONDS_T_MAX
Largest microseconds_t number possible.
uint16_t milliseconds_t
Type for durations in milli seconds.
Abstract base class for all IR readers, capturing or receiving.
milliseconds_t beginningTimeout
static const size_t defaultCaptureLength
int16_t markExcess
Microseconds subtracted from pulses and added to gaps.
virtual bool isEmpty() const