Infrared remote library for Arduino: send and receive infrared signals with multiple protocols Port from Arduino-IRremote https://github.com/z3t0/Arduino-IRremote

Dependents:   Lilnija_29012017 NucleoF042K6_IRReceiver

Revision:
3:17440cf7ab90
Parent:
0:70c8e56bac45
--- a/IRremote.cpp	Sat Jan 23 15:36:14 2016 +0900
+++ b/IRremote.cpp	Sat Jan 23 15:09:34 2016 +0000
@@ -18,8 +18,6 @@
 // Whynter A/C ARC-110WD added by Francesco Meschia
 //******************************************************************************
 
-#include <avr/interrupt.h>
-
 // Defining IR_GLOBAL here allows us to declare the instantiation of global variables
 #define IR_GLOBAL
 #	include "IRremote.h"
@@ -103,13 +101,11 @@
 // As soon as first MARK arrives:
 //   Gap width is recorded; Ready is cleared; New logging starts
 //
-ISR (TIMER_INTR_NAME)
+void IRrecv::timer_isr ()
 {
-	TIMER_RESET;
-
 	// Read if IR Receiver -> SPACE [xmt LED off] or a MARK [xmt LED on]
 	// digitalRead() is very slow. Optimisation is possible, but makes the code unportable
-	uint8_t  irdata = (uint8_t)digitalRead(irparams.recvpin);
+	uint8_t  irdata = _recvpin.read();
 
 	irparams.timer++;  // One more 50uS tick
 	if (irparams.rawlen >= RAWBUF)  irparams.rcvstate = STATE_OVERFLOW ;  // Buffer overflow
@@ -164,13 +160,4 @@
 			irparams.rcvstate = STATE_STOP;
 		 	break;
 	}
-
-	// If requested, flash LED while receiving IR data
-	if (irparams.blinkflag) {
-		if (irdata == MARK)
-			if (irparams.blinkpin) digitalWrite(irparams.blinkpin, HIGH); // Turn user defined pin LED on
-				else BLINKLED_ON() ;   // if no user defined LED pin, turn default LED pin for the hardware on
-		else if (irparams.blinkpin) digitalWrite(irparams.blinkpin, LOW); // Turn user defined pin LED on
-				else BLINKLED_OFF() ;   // if no user defined LED pin, turn default LED pin for the hardware on
-	}
 }