McMajan Library Pack  v 2.00
Improve your Arduino !
Ss_McIRDA_Int.h
Go to the documentation of this file.
1 #ifndef _McIRDAint_h_
2 #define _McIRDAint_h_
3 
4 #include "Ss_McIRDA.h"
6 
7 
8 //#if defined(ARDUINO_ARCH_AVR)
9 
10  //#warning INCLUSION McIRDA_Int OK
11 /*
12  * McIRDA
13  * Version 0.1 July, 2009
14  * Copyright 2009 Ken Shirriff
15  * For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
16  *
17  * Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
18  *
19  * Interrupt code based on NECIRrcv by Joe Knapp
20  * http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
21  * Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
22  *
23  * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
24  */
25 
26 
27 
28 
29 // define which timer to use
30 //
31 // Uncomment the timer you wish to use on your board. If you
32 // are using another library which uses timer2, you have options
33 // to switch McIRDA to use a different timer.
34 
35 // Arduino Mega
36 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
37  //#define IR_USE_TIMER1 // tx = pin 11
38  #define IR_USE_TIMER2 // tx = pin 9
39  //#define IR_USE_TIMER3 // tx = pin 5
40  //#define IR_USE_TIMER4 // tx = pin 6
41  //#define IR_USE_TIMER5 // tx = pin 46
42 
43 // Teensy 1.0
44 #elif defined(__AVR_AT90USB162__)
45  #define IR_USE_TIMER1 // tx = pin 17
46 
47 // Teensy 2.0
48 #elif defined(__AVR_ATmega32U4__)
49  //#define IR_USE_TIMER1 // tx = pin 14
50  //#define IR_USE_TIMER3 // tx = pin 9
51  #define IR_USE_TIMER4_HS // tx = pin 10
52 
53 // Teensy++ 1.0 & 2.0
54 #elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
55  //#define IR_USE_TIMER1 // tx = pin 25
56  #define IR_USE_TIMER2 // tx = pin 1
57  //#define IR_USE_TIMER3 // tx = pin 16
58 
59 // Sanguino
60 #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
61  //#define IR_USE_TIMER1 // tx = pin 13
62  #define IR_USE_TIMER2 // tx = pin 14
63 
64 // Atmega8
65 #elif defined(__AVR_ATmega8P__) || defined(__AVR_ATmega8__)
66  #define IR_USE_TIMER1 // tx = pin 9
67 
68 
69 
70 // Arduino Due
71 #elif defined(__SAM3X8E__) || defined(__SAM3X8H__)
72  //#define IR_USE_PWM0 // tx = pin 34
73  //#define IR_USE_PWM1 // tx = pin 36
74  //#define IR_USE_PWM2 // tx = pin 38
75  //#define IR_USE_PWM3 // tx = pin 40
76  //#define IR_USE_PWM4 // tx = pin 9
77  //#define IR_USE_PWM5 // tx = pin 8
78  #define IR_USE_PWM6 // tx = pin 7
79  //#define IR_USE_PWM7 // tx = pin 6
80 
81  #define IR_USE_TC3 // Use timer clock 3.
82  //#define IR_USE_TC4 // Use timer clock 4.
83  //#define IR_USE_TC5 // Use timer clock 5.
84 
85  #define IR_USE_SAM // Used to correct code where needed to be compatible with the Due.
86  #define IR_USE_DUE // Used to correctly map pins. (The idea being there might be more than one Arduino model based on SAM cores.)
87 
88 
89 
90 
91 
92 
93 
94 #elif defined( __AVR_ATtinyX4__ )
95  #define IR_USE_TIMER1 // tx = pin 6
96 
97 // Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, etc
98 #else
99  //#define IR_USE_TIMER1 // tx = pin 9
100  #define IR_USE_TIMER2 // tx = pin 3
101 #endif
102 
103 
104 #ifdef F_CPU
105  #define SYSCLOCK F_CPU // main Arduino clock
106 #else
107  #define SYSCLOCK 16000000 // main Arduino clock
108 #endif
109 
110 #define ERR 0
111 #define DECODED 1
112 
113 
114 // defines for setting and clearing register bits
115 #ifndef cbi
116 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
117 #endif
118 #ifndef sbi
119 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
120 #endif
121 
122 // Pulse parms are *50-100 for the Mark and *50+100 for the space
123 // First MARK is the one after the long gap
124 // pulse parameters in usec
125 #define NEC_HDR_MARK 9000
126 #define NEC_HDR_SPACE 4500
127 #define NEC_BIT_MARK 560
128 #define NEC_ONE_SPACE 1600
129 #define NEC_ZERO_SPACE 560
130 #define NEC_RPT_SPACE 2250
131 
132 #define SONY_HDR_MARK 2400
133 #define SONY_HDR_SPACE 600
134 #define SONY_ONE_MARK 1200
135 #define SONY_ZERO_MARK 600
136 #define SONY_RPT_LENGTH 45000
137 #define SONY_DOUBLE_SPACE_USECS 500 // usually ssee 713 - not using ticks as get number wrapround
138 
139 // SA 8650B
140 #define SANYO_HDR_MARK 3500 // seen range 3500
141 #define SANYO_HDR_SPACE 950 // seen 950
142 #define SANYO_ONE_MARK 2400 // seen 2400
143 #define SANYO_ZERO_MARK 700 // seen 700
144 #define SANYO_DOUBLE_SPACE_USECS 800 // usually ssee 713 - not using ticks as get number wrapround
145 #define SANYO_RPT_LENGTH 45000
146 
147 // Mitsubishi RM 75501
148 // 14200 7 41 7 42 7 42 7 17 7 17 7 18 7 41 7 18 7 17 7 17 7 18 7 41 8 17 7 17 7 18 7 17 7
149 
150 // #define MITSUBISHI_HDR_MARK 250 // seen range 3500
151 #define MITSUBISHI_HDR_SPACE 350 // 7*50+100
152 #define MITSUBISHI_ONE_MARK 1950 // 41*50-100
153 #define MITSUBISHI_ZERO_MARK 750 // 17*50-100
154 // #define MITSUBISHI_DOUBLE_SPACE_USECS 800 // usually ssee 713 - not using ticks as get number wrapround
155 // #define MITSUBISHI_RPT_LENGTH 45000
156 
157 
158 #define RC5_T1 889
159 #define RC5_RPT_LENGTH 46000
160 
161 #define RC6_HDR_MARK 2666
162 #define RC6_HDR_SPACE 889
163 #define RC6_T1 444
164 #define RC6_RPT_LENGTH 46000
165 
166 #define SHARP_BIT_MARK 245
167 #define SHARP_ONE_SPACE 1805
168 #define SHARP_ZERO_SPACE 795
169 #define SHARP_GAP 600000
170 #define SHARP_TOGGLE_MASK 0x3FF
171 #define SHARP_RPT_SPACE 3000
172 
173 #define DISH_HDR_MARK 400
174 #define DISH_HDR_SPACE 6100
175 #define DISH_BIT_MARK 400
176 #define DISH_ONE_SPACE 1700
177 #define DISH_ZERO_SPACE 2800
178 #define DISH_RPT_SPACE 6200
179 #define DISH_TOP_BIT 0x8000
180 
181 
182  #define PANASONIC_HDR_MARK 3502
183  #define PANASONIC_HDR_SPACE 1750
184  #define PANASONIC_BIT_MARK 502
185  #define PANASONIC_ONE_SPACE 1244
186  #define PANASONIC_ZERO_SPACE 400
187 
188 #define JVC_HDR_MARK 8000
189 #define JVC_HDR_SPACE 4000
190 #define JVC_BIT_MARK 600
191 #define JVC_ONE_SPACE 1600
192 #define JVC_ZERO_SPACE 550
193 #define JVC_RPT_LENGTH 60000
194 
195 
196 #define SAMSUNG_HDR_MARK 4500
197 #define SAMSUNG_BITS 32
198 #define SAMSUNG_HDR_SPACE 4500
199 #define SAMSUNG_BIT_MARK 560
200 #define SAMSUNG_ONE_SPACE 1600
201 #define SAMSUNG_ZERO_SPACE 600
202 
203 
204 #define DAIKIN_MARK 450
205 #define DAIKIN_ONE_SPACE 1270
206 
207 
208 #define DAIKIN_ZERO_SPACE 425
209 
210 #define DAIKIN_POST_SPACE 1670
211 
212 #define DAIKIN_LONG_MARK 3490
213 #define DAIKIN_LONG_SPACE 24870
214 #define DAIKIN_VERY_LONG_SPACE 35150
215 
216 
217 
218 
219 
220 /*
221 A start bit is 5 millisecond ON and 2 millisecond OFF
222 
223 A zero mark is approximately 525 microseconds ON and 525 microseconds OFF.
224 A 1 space is approximately 525 microseconds ON and 1600 microseconds OFF.
225 
226 A terminating bit is 525 microseconds ON and more than 1600 microseconds OFF.
227 
228 The time between start and repeated start condition is approx 30 milliseconds.
229 
230 
231 #define MARK 0
232 #define SPACE 1
233 
234 */
235 
236 
237 
238 
239 
240 
241 
242 
243 
244 #define SHARP_BITS 15
245 #define DISH_BITS 16
246 
247 #define TOLERANCE 25 // percent tolerance in measurements
248 #define LTOL (1.0 - TOLERANCE/100.)
249 #define UTOL (1.0 + TOLERANCE/100.)
250 #ifdef USE_DAIKIN_FTX
251  #define _GAP 37500 // Modificated long gap for Daikin
252 #else
253  #define _GAP 5000 // Original Minimum map between transmissions
254 #endif
255 // originale: #define _GAP 5000 // Minimum map between transmissions
256 
257 
258 #define GAP_TICKS ((unsigned int)_GAP/(unsigned int)USECPERTICK)
259 //#define GAP_TICKS 750
260 
261 
262 #define TICKS_LOW(us) (int) (((us)*LTOL/USECPERTICK))
263 #define TICKS_HIGH(us) (int) (((us)*UTOL/USECPERTICK + 1))
264 
265 
266 
267 // receiver states
268 #define STATE_IDLE 2
269 #define STATE_MARK 3
270 #define STATE_SPACE 4
271 #define STATE_STOP 5
272 
273 // information for the interrupt handler
274 typedef struct {
275  uint8_t recvpin; // pin for IR data from detector
276  uint8_t rcvstate; // state machine
277  uint8_t blinkflag; // TRUE to enable blinking of pin 13 on IR processing
278  unsigned int timer; // state timer, counts 50uS ticks.
279  unsigned int rawbuf[RAWBUF]; // raw data
280  unsigned int rawlen; // counter of entries in rawbuf
281 }
282 irparams_t;
283 
284 // Defined in McIRDA.cpp
285 extern volatile irparams_t irparams;
286 
287 // IR detector output is active low
288 #define MARK 0
289 #define SPACE 1
290 
291 #define TOPBIT 0x80000000
292 
293 #define NEC_BITS 32
294 #define SONY_BITS 12
295 #define SANYO_BITS 12
296 #define MITSUBISHI_BITS 16
297 #define MIN_RC5_SAMPLES 11
298 #define MIN_RC6_SAMPLES 1
299 #define PANASONIC_BITS 48
300 #define JVC_BITS 16
301 #define DAIKIN_BITS 290
302 
303 
304 
305 // defines for timer2 (8 bits)
306 #if defined(IR_USE_TIMER2)
307 #define TIMER_RESET
308 #define TIMER_ENABLE_PWM (TCCR2A |= _BV(COM2B1))
309 #define TIMER_DISABLE_PWM (TCCR2A &= ~(_BV(COM2B1)))
310 #define TIMER_ENABLE_INTR (TIMSK2 = _BV(OCIE2A))
311 #define TIMER_DISABLE_INTR (TIMSK2 = 0)
312 #define TIMER_INTR_NAME TIMER2_COMPA_vect
313 #define TIMER_CONFIG_KHZ(val) ({
314  const uint8_t pwmval = SYSCLOCK / 2000 / (val);
315  TCCR2A = _BV(WGM20);
316  TCCR2B = _BV(WGM22) | _BV(CS20);
317  OCR2A = pwmval;
318  OCR2B = pwmval / 3; \
319 })
320 #define TIMER_COUNT_TOP (SYSCLOCK * USECPERTICK / 1000000)
321 #if (TIMER_COUNT_TOP < 256)
322 #define TIMER_CONFIG_NORMAL() ({
323  TCCR2A = _BV(WGM21);
324  TCCR2B = _BV(CS20);
325  OCR2A = TIMER_COUNT_TOP;
326  TCNT2 = 0; \
327 })
328 #else
329 #define TIMER_CONFIG_NORMAL() ({
330  TCCR2A = _BV(WGM21);
331  TCCR2B = _BV(CS21);
332  OCR2A = TIMER_COUNT_TOP / 8;
333  TCNT2 = 0; \
334 })
335 #endif
336 #if defined(CORE_OC2B_PIN)
337 #define TIMER_PWM_PIN CORE_OC2B_PIN /* Teensy */
338 #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
339 #define TIMER_PWM_PIN 9 /* Arduino Mega */
340 #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
341 #define TIMER_PWM_PIN 14 /* Sanguino */
342 #else
343 #define TIMER_PWM_PIN 3 /* Arduino Duemilanove, Diecimila, LilyPad, etc */
344 #endif
345 
346 
347 // defines for timer1 (16 bits)
348 #elif defined(IR_USE_TIMER1)
349 #define TIMER_RESET
350 #define TIMER_ENABLE_PWM (TCCR1A |= _BV(COM1A1))
351 #define TIMER_DISABLE_PWM (TCCR1A &= ~(_BV(COM1A1)))
352 #if defined(__AVR_ATmega8P__) || defined(__AVR_ATmega8__)
353  #define TIMER_ENABLE_INTR (TIMSK = _BV(OCIE1A))
354  #define TIMER_DISABLE_INTR (TIMSK = 0)
355 #else
356  #define TIMER_ENABLE_INTR (TIMSK1 = _BV(OCIE1A))
357  #define TIMER_DISABLE_INTR (TIMSK1 = 0)
358 #endif
359 
360 #if defined(__AVR_ATtinyX4__)
361  #define TIMER_INTR_NAME TIM1_COMPA_vect
362 #else
363  #define TIMER_INTR_NAME TIMER1_COMPA_vect
364 #endif
365 
366 #define TIMER_CONFIG_KHZ(val) ({
367  const uint16_t pwmval = SYSCLOCK / 2000 / (val);
368  TCCR1A = _BV(WGM11);
369  TCCR1B = _BV(WGM13) | _BV(CS10);
370  ICR1 = pwmval;
371  OCR1A = pwmval / 3; \
372 })
373 #define TIMER_CONFIG_NORMAL() ({
374  TCCR1A = 0;
375  TCCR1B = _BV(WGM12) | _BV(CS10);
376  OCR1A = SYSCLOCK * USECPERTICK / 1000000;
377  TCNT1 = 0; \
378 })
379 #if defined(CORE_OC1A_PIN)
380 #define TIMER_PWM_PIN CORE_OC1A_PIN /* Teensy */
381 #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
382 #define TIMER_PWM_PIN 11 /* Arduino Mega */
383 #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
384 #define TIMER_PWM_PIN 13 /* Sanguino */
385 #elif defined(__AVR_ATtinyX4__)
386 #define TIMER_PWM_PIN 6 /* ATTiny84 */
387 #else
388 #define TIMER_PWM_PIN 9 /* Arduino Duemilanove, Diecimila, LilyPad, etc */
389 #endif
390 
391 
392 // defines for timer3 (16 bits)
393 #elif defined(IR_USE_TIMER3)
394 #define TIMER_RESET
395 #define TIMER_ENABLE_PWM (TCCR3A |= _BV(COM3A1))
396 #define TIMER_DISABLE_PWM (TCCR3A &= ~(_BV(COM3A1)))
397 #define TIMER_ENABLE_INTR (TIMSK3 = _BV(OCIE3A))
398 #define TIMER_DISABLE_INTR (TIMSK3 = 0)
399 #define TIMER_INTR_NAME TIMER3_COMPA_vect
400 #define TIMER_CONFIG_KHZ(val) ({
401  const uint16_t pwmval = SYSCLOCK / 2000 / (val);
402  TCCR3A = _BV(WGM31);
403  TCCR3B = _BV(WGM33) | _BV(CS30);
404  ICR3 = pwmval;
405  OCR3A = pwmval / 3; \
406 })
407 #define TIMER_CONFIG_NORMAL() ({
408  TCCR3A = 0;
409  TCCR3B = _BV(WGM32) | _BV(CS30);
410  OCR3A = SYSCLOCK * USECPERTICK / 1000000;
411  TCNT3 = 0; \
412 })
413 #if defined(CORE_OC3A_PIN)
414 #define TIMER_PWM_PIN CORE_OC3A_PIN /* Teensy */
415 #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
416 #define TIMER_PWM_PIN 5 /* Arduino Mega */
417 #else
418 #error "Please add OC3A pin number here\n"
419 #endif
420 
421 
422 // defines for timer4 (10 bits, high speed option)
423 #elif defined(IR_USE_TIMER4_HS)
424 #define TIMER_RESET
425 #define TIMER_ENABLE_PWM (TCCR4A |= _BV(COM4A1))
426 #define TIMER_DISABLE_PWM (TCCR4A &= ~(_BV(COM4A1)))
427 #define TIMER_ENABLE_INTR (TIMSK4 = _BV(TOIE4))
428 #define TIMER_DISABLE_INTR (TIMSK4 = 0)
429 #define TIMER_INTR_NAME TIMER4_OVF_vect
430 #define TIMER_CONFIG_KHZ(val) ({
431  const uint16_t pwmval = SYSCLOCK / 2000 / (val);
432  TCCR4A = (1<<PWM4A);
433  TCCR4B = _BV(CS40);
434  TCCR4C = 0;
435  TCCR4D = (1<<WGM40);
436  TCCR4E = 0;
437  TC4H = pwmval >> 8;
438  OCR4C = pwmval;
439  TC4H = (pwmval / 3) >> 8;
440  OCR4A = (pwmval / 3) & 255; \
441 })
442 #define TIMER_CONFIG_NORMAL() ({
443  TCCR4A = 0;
444  TCCR4B = _BV(CS40);
445  TCCR4C = 0;
446  TCCR4D = 0;
447  TCCR4E = 0;
448  TC4H = (SYSCLOCK * USECPERTICK / 1000000) >> 8;
449  OCR4C = (SYSCLOCK * USECPERTICK / 1000000) & 255;
450  TC4H = 0;
451  TCNT4 = 0; \
452 })
453 #if defined(CORE_OC4A_PIN)
454 #define TIMER_PWM_PIN CORE_OC4A_PIN /* Teensy */
455 #elif defined(__AVR_ATmega32U4__)
456 #define TIMER_PWM_PIN 13 /* Leonardo */
457 #else
458 #error "Please add OC4A pin number here\n"
459 #endif
460 
461 
462 // defines for timer4 (16 bits)
463 #elif defined(IR_USE_TIMER4)
464 #define TIMER_RESET
465 #define TIMER_ENABLE_PWM (TCCR4A |= _BV(COM4A1))
466 #define TIMER_DISABLE_PWM (TCCR4A &= ~(_BV(COM4A1)))
467 #define TIMER_ENABLE_INTR (TIMSK4 = _BV(OCIE4A))
468 #define TIMER_DISABLE_INTR (TIMSK4 = 0)
469 #define TIMER_INTR_NAME TIMER4_COMPA_vect
470 #define TIMER_CONFIG_KHZ(val) ({
471  const uint16_t pwmval = SYSCLOCK / 2000 / (val);
472  TCCR4A = _BV(WGM41);
473  TCCR4B = _BV(WGM43) | _BV(CS40);
474  ICR4 = pwmval;
475  OCR4A = pwmval / 3; \
476 })
477 #define TIMER_CONFIG_NORMAL() ({
478  TCCR4A = 0;
479  TCCR4B = _BV(WGM42) | _BV(CS40);
480  OCR4A = SYSCLOCK * USECPERTICK / 1000000;
481  TCNT4 = 0; \
482 })
483 #if defined(CORE_OC4A_PIN)
484 #define TIMER_PWM_PIN CORE_OC4A_PIN
485 #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
486 #define TIMER_PWM_PIN 6 /* Arduino Mega */
487 #else
488 #error "Please add OC4A pin number here\n"
489 #endif
490 
491 
492 // defines for timer5 (16 bits)
493 #elif defined(IR_USE_TIMER5)
494 #define TIMER_RESET
495 #define TIMER_ENABLE_PWM (TCCR5A |= _BV(COM5A1))
496 #define TIMER_DISABLE_PWM (TCCR5A &= ~(_BV(COM5A1)))
497 #define TIMER_ENABLE_INTR (TIMSK5 = _BV(OCIE5A))
498 #define TIMER_DISABLE_INTR (TIMSK5 = 0)
499 #define TIMER_INTR_NAME TIMER5_COMPA_vect
500 #define TIMER_CONFIG_KHZ(val) ({
501  const uint16_t pwmval = SYSCLOCK / 2000 / (val);
502  TCCR5A = _BV(WGM51);
503  TCCR5B = _BV(WGM53) | _BV(CS50);
504  ICR5 = pwmval;
505  OCR5A = pwmval / 3; \
506 })
507 #define TIMER_CONFIG_NORMAL() ({
508  TCCR5A = 0;
509  TCCR5B = _BV(WGM52) | _BV(CS50);
510  OCR5A = SYSCLOCK * USECPERTICK / 1000000;
511  TCNT5 = 0; \
512 })
513 #if defined(CORE_OC5A_PIN)
514 #define TIMER_PWM_PIN CORE_OC5A_PIN
515 #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
516 #define TIMER_PWM_PIN 46 /* Arduino Mega */
517 #else
518 #error "Please add OC5A pin number here\n"
519 #endif
520 
521 
522 #else // unknown timer
523 #error "Internal code configuration error, no known IR_USE_TIMER# defined\n"
524 #endif
525 
526 
527 // defines for blinking the LED
528 #if defined(CORE_LED0_PIN)
529 #define BLINKLED CORE_LED0_PIN
530 #define BLINKLED_ON() (digitalWrite(CORE_LED0_PIN, HIGH))
531 #define BLINKLED_OFF() (digitalWrite(CORE_LED0_PIN, LOW))
532 #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
533 #define BLINKLED 13
534 #define BLINKLED_ON() (PORTB |= B10000000)
535 #define BLINKLED_OFF() (PORTB &= B01111111)
536 #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
537 #define BLINKLED 0
538 #define BLINKLED_ON() (PORTD |= B00000001)
539 #define BLINKLED_OFF() (PORTD &= B11111110)
540 #else
541 #define BLINKLED 13
542 #define BLINKLED_ON() (PORTB |= B00100000)
543 #define BLINKLED_OFF() (PORTB &= B11011111)
544 #endif
545 
546 
547 
548 
549 /*
550 #elif defined(ARDUINO_ARCH_SAM)
551  #error Arduino SAM family is not supported by McIRDA (_Int .h)
552 #else
553  #error Yor platform is not supported by McIRDA (_Int .h)
554 #endif */
555 #endif
#define _GAP
#define SYSCLOCK
#define TOLERANCE
#define UTOL
uint8_t recvpin
#define USECPERTICK
Definition: Ss_McIRDA.h:154
#define IR_USE_TIMER2
unsigned int timer
unsigned int rawlen
uint8_t blinkflag
#define RAWBUF
Definition: Ss_McIRDA.h:158
volatile irparams_t irparams
Definition: Ss_McIRDA.cpp:14
#define LTOL
uint8_t rcvstate
unsigned int rawbuf[RAWBUF]
#define TIMER_COUNT_TOP