Go to the documentation of this file.
32 #if ! defined(RAW_BUFFER_LENGTH)
33 #define RAW_BUFFER_LENGTH 101
52 #define IR_REC_STATE_IDLE 2
53 #define IR_REC_STATE_MARK 3
54 #define IR_REC_STATE_SPACE 4
55 #define IR_REC_STATE_STOP 5
56 #define IR_REC_STATE_OVERFLOW 6
73 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
77 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
92 #define MARK_EXCESS 100
99 #define LTOL (100 - TOLERANCE)
102 #define UTOL (100 + TOLERANCE)
108 #define GAP_TICKS (_GAP/USECPERTICK)
112 #if USECPERTICK == 50 && TOLERANCE == 25 // Defaults
113 #define TICKS_LOW(us) ((int) ((us)/67 )) // (us) / ((USECPERTICK:50 / LTOL:75 ) * 100)
114 #define TICKS_HIGH(us) ((int) ((us)/40 + 1)) // (us) / ((USECPERTICK:50 / UTOL:125) * 100) + 1
116 #define TICKS_LOW(us) ((int) ((long) (us) * LTOL / (USECPERTICK * 100) ))
117 #define TICKS_HIGH(us) ((int) ((long) (us) * UTOL / (USECPERTICK * 100) + 1))
uint8_t overflow
Raw buffer overflow occurred.
unsigned int timer
State timer, counts 50uS ticks.
This struct is used to communicate with the ISR (interrupt service routine).
uint8_t recvpin
Pin connected to IR data from detector.
uint8_t rcvstate
State Machine state.
volatile irparams_t irparams
Allow all parts of the code access to the ISR data NB.
All board specific information should be contained in this file. It defines a number of macros,...
#define RAW_BUFFER_LENGTH
Maximum length of raw duration buffer. Must be odd.
uint8_t blinkflag
true -> enable blinking of pin on IR processing
unsigned int rawlen
counter of entries in rawbuf