IRremote
IRremoteInt.h
Go to the documentation of this file.
1 
33 #ifndef _IR_REMOTE_INT_H
34 #define _IR_REMOTE_INT_H
35 
36 #include <Arduino.h>
37 
38 #define MARK 1
39 #define SPACE 0
40 
41 #if defined(PARTICLE)
42 #define F_CPU 16000000 // definition for a board for which F_CPU is not defined
43 #endif
44 #if defined(F_CPU) // F_CPU is used to generate the receive send timings in some CPU's
45 #define CLOCKS_PER_MICRO (F_CPU / MICROS_IN_ONE_SECOND)
46 #endif
47 
48 /*
49  * For backwards compatibility
50  */
51 #if defined(SYSCLOCK) // allow for processor specific code to define F_CPU
52 #undef F_CPU
53 #define F_CPU SYSCLOCK // Clock frequency to be used for timing.
54 #endif
55 
56 //#define DEBUG // Activate this for lots of lovely debug output from the IRremote core and all protocol decoders.
57 //#define TRACE // Activate this for more debug output.
58 
62 #define DISABLE_LED_FEEDBACK false
63 #define ENABLE_LED_FEEDBACK true
64 #define USE_DEFAULT_FEEDBACK_LED_PIN 0
65 
70 #if !defined(RAW_BUFFER_LENGTH)
71 # if defined(DECODE_MAGIQUEST)
72 #define RAW_BUFFER_LENGTH 112 // MagiQuest requires 112 bytes.
73 # else
74 #define RAW_BUFFER_LENGTH 100
75 //#define RAW_BUFFER_LENGTH 750 // 750 (600 if we have only 2k RAM) is the value for air condition remotes.
76 # endif
77 #endif
78 #if RAW_BUFFER_LENGTH % 2 == 1
79 #error RAW_BUFFER_LENGTH must be even, since the array consists of space / mark pairs.
80 #endif
81 
82 /****************************************************
83  * Declarations for the receiver Interrupt Service Routine
84  ****************************************************/
85 // ISR State-Machine : Receiver States
86 #define IR_REC_STATE_IDLE 0
87 #define IR_REC_STATE_MARK 1
88 #define IR_REC_STATE_SPACE 2
89 #define IR_REC_STATE_STOP 3 // set to IR_REC_STATE_IDLE only by resume()
90 
96  // The fields are ordered to reduce memory over caused by struct-padding
97  volatile uint8_t StateForISR;
98  uint_fast8_t IRReceivePin;
99 #if defined(__AVR__)
100  volatile uint8_t *IRReceivePinPortInputRegister;
101  uint8_t IRReceivePinMask;
102 #endif
103  volatile uint_fast16_t TickCounterForISR;
104 #if !IR_REMOTE_DISABLE_RECEIVE_COMPLETE_CALLBACK
106 #endif
108 #if RAW_BUFFER_LENGTH <= 254 // saves around 75 bytes program memory and speeds up ISR
109  uint_fast8_t rawlen;
110 #else
111  uint_fast16_t rawlen;
112 #endif
113  unsigned int rawbuf[RAW_BUFFER_LENGTH];
114 };
115 
116 #if (__INT_WIDTH__ < 32)
117 typedef uint32_t IRRawDataType;
118 #else
119 typedef uint64_t IRRawDataType;
120 #endif
121 #include "IRProtocol.h"
122 
123 /*
124  * Debug directives
125  */
126 #if defined(DEBUG) || defined(TRACE)
127 # define IR_DEBUG_PRINT(...) Serial.print(__VA_ARGS__)
128 # define IR_DEBUG_PRINTLN(...) Serial.println(__VA_ARGS__)
129 #else
130 
133 # define IR_DEBUG_PRINT(...) void()
134 
137 # define IR_DEBUG_PRINTLN(...) void()
138 #endif
139 
140 #if defined(TRACE)
141 # define IR_TRACE_PRINT(...) Serial.print(__VA_ARGS__)
142 # define IR_TRACE_PRINTLN(...) Serial.println(__VA_ARGS__)
143 #else
144 # define IR_TRACE_PRINT(...) void()
145 # define IR_TRACE_PRINTLN(...) void()
146 #endif
147 
148 /****************************************************
149  * RECEIVING
150  ****************************************************/
151 
156  decode_type_t decode_type; // deprecated, moved to decodedIRData.protocol ///< UNKNOWN, NEC, SONY, RC5, ...
157  uint16_t address; // Used by Panasonic & Sharp [16-bits]
158  uint32_t value; // deprecated, moved to decodedIRData.decodedRawData ///< Decoded value / command [max 32-bits]
159  uint8_t bits; // deprecated, moved to decodedIRData.numberOfBits ///< Number of bits in decoded value
160  uint16_t magnitude; // deprecated, moved to decodedIRData.extra ///< Used by MagiQuest [16-bits]
161  bool isRepeat; // deprecated, moved to decodedIRData.flags ///< True if repeat of value is detected
162 
163 // next 3 values are copies of irparams values - see IRremoteint.h
164  unsigned int *rawbuf; // deprecated, moved to decodedIRData.rawDataPtr->rawbuf ///< Raw intervals in 50uS ticks
165  uint_fast8_t rawlen; // deprecated, moved to decodedIRData.rawDataPtr->rawlen ///< Number of records in rawbuf
166  bool overflow; // deprecated, moved to decodedIRData.flags ///< true if IR raw code too long
167 };
168 
172 class IRrecv {
173 public:
174 
175  IRrecv();
176  IRrecv(uint_fast8_t aReceivePin);
177  IRrecv(uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin);
178  void setReceivePin(uint_fast8_t aReceivePinNumber);
179  void registerReceiveCompleteCallback(void (*aReceiveCompleteCallbackFunction)(void));
180  /*
181  * Stream like API
182  */
183  void begin(uint_fast8_t aReceivePin, bool aEnableLEDFeedback = false, uint_fast8_t aFeedbackLEDPin =
185  void start();
186  void enableIRIn(); // alias for start
187  void start(uint32_t aMicrosecondsToAddToGapCounter);
188  void startWithTicksToAdd(uint16_t aTicksToAddToGapCounter);
189  void restartAfterSend();
190 
191  bool available();
192  IRData* read(); // returns decoded data
193  // write is a method of class IRsend below
194  // size_t write(IRData *aIRSendData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
195  void stop();
196  void disableIRIn(); // alias for stop
197  void end(); // alias for stop
198 
199  bool isIdle();
200 
201  /*
202  * The main functions
203  */
204  bool decode(); // Check if available and try to decode
205  void resume(); // Enable receiving of the next value
206 
207  /*
208  * Useful info and print functions
209  */
210  void printIRResultMinimal(Print *aSerial);
211  void printIRResultRawFormatted(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks = true);
212  void printIRResultAsCVariables(Print *aSerial);
213 
214  /*
215  * Next 4 functions are also available as non member functions
216  */
217  bool printIRResultShort(Print *aSerial, bool aPrintRepeatGap = true, bool aCheckForRecordGapsMicros = true);
218  void printIRSendUsage(Print *aSerial);
219 #if defined(__AVR__)
220  const __FlashStringHelper* getProtocolString();
221 #else
222  const char* getProtocolString();
223 #endif
224  static void printActiveIRProtocols(Print *aSerial);
225 
226  void compensateAndPrintIRResultAsCArray(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks = true);
227  void compensateAndPrintIRResultAsPronto(Print *aSerial, unsigned int frequency = 38000U);
228 
229  /*
230  * Store the data for further processing
231  */
232  void compensateAndStoreIRResultInArray(uint8_t *aArrayPtr);
233  size_t compensateAndStorePronto(String *aString, unsigned int frequency = 38000U);
234 
235  /*
236  * The main decoding functions used by the individual decoders
237  */
238  bool decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits,
239  uint_fast8_t aStartOffset = 3);
240 
241  bool decodePulseDistanceWidthData(uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, unsigned int aOneMarkMicros,
242  unsigned int aZeroMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroSpaceMicros, bool aMSBfirst);
243 
244  bool decodeBiPhaseData(uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, uint_fast8_t aStartClockCount,
245  uint_fast8_t aValueOfSpaceToMarkTransition, unsigned int aBiphaseTimeUnit);
246 
247  void initBiphaselevel(uint_fast8_t aRCDecodeRawbuffOffset, unsigned int aBiphaseTimeUnit);
248  uint_fast8_t getBiphaselevel();
249 
250  /*
251  * All standard (decode address + command) protocol decoders
252  */
253  bool decodeBangOlufsen();
254  bool decodeBoseWave();
255  bool decodeDenon();
256  bool decodeJVC();
257  bool decodeKaseikyo();
259  bool decodeLG();
260  bool decodeMagiQuest(); // not completely standard
261  bool decodeNEC();
262  bool decodeRC5();
263  bool decodeRC6();
264  bool decodeSamsung();
265  bool decodeSharp(); // redirected to decodeDenon()
266  bool decodeSony();
267  bool decodeWhynter();
268 
269  bool decodeDistanceWidth();
270 
271  bool decodeHash();
272 
273  // Template function :-)
274  bool decodeShuzu();
275 
276  /*
277  * Old functions
278  */
279  bool decodeDenonOld(decode_results *aResults);
280  bool decodeJVCMSB(decode_results *aResults);
281  bool decodeLGMSB(decode_results *aResults);
282  bool decodeNECMSB(decode_results *aResults);
284  bool decodeSonyMSB(decode_results *aResults);
285  bool decodeSAMSUNG(decode_results *aResults);
286  bool decodeHashOld(decode_results *aResults);
287 
288  bool decode(
289  decode_results *aResults)
290  __attribute__ ((deprecated ("Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> ."))); // deprecated
291 
292  // for backward compatibility. Now in IRFeedbackLED.hpp
293  void blink13(uint8_t aEnableLEDFeedback)
294  __attribute__ ((deprecated ("Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback()."))); // deprecated
295 
296  /*
297  * Internal functions
298  */
299  void initDecodedIRData();
300  uint_fast8_t compare(unsigned int oldval, unsigned int newval);
301  bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants);
302  void checkForRepeatSpaceAndSetFlag(unsigned int aMediumRepeatSpaceMicros);
303  bool checkForRecordGapsMicros(Print *aSerial);
304 
305  IRData decodedIRData; // New: decoded IR data for the application
306 
307  // Last decoded IR data for repeat detection and parity for Denon autorepeat
311 
312  uint8_t repeatCount; // Used e.g. for Denon decode for autorepeat decoding.
313 };
314 
315 extern uint_fast8_t sBiphaseDecodeRawbuffOffset; //
316 
317 /*
318  * Mark & Space matching functions
319  */
320 bool matchTicks(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros);
321 bool matchMark(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros);
322 bool matchSpace(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros);
323 
324 /*
325  * Old function names
326  */
327 bool MATCH(unsigned int measured, unsigned int desired);
328 bool MATCH_MARK(unsigned int measured_ticks, unsigned int desired_us);
329 bool MATCH_SPACE(unsigned int measured_ticks, unsigned int desired_us);
330 
331 int getMarkExcessMicros();
332 
333 void printActiveIRProtocols(Print *aSerial);
334 
335 /****************************************************
336  * Feedback LED related functions
337  ****************************************************/
338 #define DO_NOT_ENABLE_LED_FEEDBACK 0x00
339 #define LED_FEEDBACK_DISABLED_COMPLETELY 0x00
340 #define LED_FEEDBACK_ENABLED_FOR_RECEIVE 0x01
341 #define LED_FEEDBACK_ENABLED_FOR_SEND 0x02
342 void setFeedbackLED(bool aSwitchLedOn);
343 void setLEDFeedback(uint8_t aFeedbackLEDPin, uint8_t aEnableLEDFeedback); // if aFeedbackLEDPin == 0, then take board BLINKLED_ON() and BLINKLED_OFF() functions
344 void setLEDFeedback(bool aEnableLEDFeedback); // Direct replacement for blink13()
345 void enableLEDFeedback();
346 constexpr auto enableLEDFeedbackForReceive = enableLEDFeedback; // alias for enableLEDFeedback
347 void disableLEDFeedback();
348 constexpr auto disableLEDFeedbackForReceive = disableLEDFeedback; // alias for enableLEDFeedback
351 
352 void setBlinkPin(uint8_t aFeedbackLEDPin) __attribute__ ((deprecated ("Please use setLEDFeedback()."))); // deprecated
353 
354 /*
355  * Pulse parms are ((X*50)-MARK_EXCESS_MICROS) for the Mark and ((X*50)+MARK_EXCESS_MICROS) for the Space.
356  * First MARK is the one after the long gap
357  * Pulse parameters in microseconds
358  */
359 #if !defined(TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING)
360 #define TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING 25 // Relative tolerance (in percent) for matchTicks(), matchMark() and matchSpace() functions used for protocol decoding.
361 #endif
362 
364 //#define LTOL (1.0 - (TOLERANCE/100.))
365 #define LTOL (100 - TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING)
366 
367 //#define UTOL (1.0 + (TOLERANCE/100.))
368 #define UTOL (100 + TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING)
369 
370 //#define TICKS_LOW(us) ((int)(((us)*LTOL/MICROS_PER_TICK)))
371 //#define TICKS_HIGH(us) ((int)(((us)*UTOL/MICROS_PER_TICK + 1)))
372 #if MICROS_PER_TICK == 50 && TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING == 25 // Defaults
373 #define TICKS_LOW(us) ((us)/67 ) // (us) / ((MICROS_PER_TICK:50 / LTOL:75 ) * 100)
374 #define TICKS_HIGH(us) (((us)/40) + 1) // (us) / ((MICROS_PER_TICK:50 / UTOL:125) * 100) + 1
375 #else
376 #define TICKS_LOW(us) ((unsigned int ) ((long) (us) * LTOL / (MICROS_PER_TICK * 100) ))
377 #define TICKS_HIGH(us) ((unsigned int ) ((long) (us) * UTOL / (MICROS_PER_TICK * 100) + 1))
378 #endif
379 
380 /*
381  * The receiver instance
382  */
383 extern IRrecv IrReceiver;
384 
385 /****************************************************
386  * SENDING
387  ****************************************************/
388 
392 #define NO_REPEATS 0
393 #define SEND_STOP_BIT true
394 #define SEND_NO_STOP_BIT false
395 #define SEND_REPEAT_COMMAND true
396 
397 
400 class IRsend {
401 public:
402  IRsend();
403 
404  /*
405  * IR_SEND_PIN is defined
406  */
407 #if defined(IR_SEND_PIN)
408  void begin();
409  void begin(bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin = USE_DEFAULT_FEEDBACK_LED_PIN);
410  // The next function is a dummy to avoid acceptance of pre 4.0 calls to begin(IR_SEND_PIN, DISABLE_LED_FEEDBACK);
411  void begin(uint_fast8_t aSendPin, bool aEnableLEDFeedback)
412 # if !defined (DOXYGEN)
413  __attribute__ ((deprecated ("You must use begin(ENABLE_LED_FEEDBACK) or begin(DISABLE_LED_FEEDBACK) since version 4.0.")));
414 # endif
415 #else
416  IRsend(uint_fast8_t aSendPin);
417  void begin(uint_fast8_t aSendPin);
418  void setSendPin(uint_fast8_t aSendPin); // required if we use IRsend() as constructor
419  // Since 4.0 guarded and without default parameter
420  void begin(uint_fast8_t aSendPin, bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin); // aFeedbackLEDPin can be USE_DEFAULT_FEEDBACK_LED_PIN
421 #endif
422 
423  size_t write(IRData *aIRSendData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
424 
425  void enableIROut(uint_fast8_t aFrequencyKHz);
426 
427  void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, unsigned int aHeaderMarkMicros,
428  unsigned int aHeaderSpaceMicros, unsigned int aOneMarkMicros, unsigned int aOneSpaceMicros,
429  unsigned int aZeroMarkMicros, unsigned int aZeroSpaceMicros, IRRawDataType *aDecodedRawDataArray,
430  unsigned int aNumberOfBits, bool aMSBfirst, bool aSendStopBit, unsigned int aRepeatPeriodMillis,
431  int_fast8_t aNumberOfRepeats);
433  IRRawDataType *aDecodedRawDataArray, unsigned int aNumberOfBits, int_fast8_t aNumberOfRepeats);
434  void sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits,
435  int_fast8_t aNumberOfRepeats);
437  uint_fast8_t aNumberOfBits);
438  void sendPulseDistanceWidth(uint_fast8_t aFrequencyKHz, unsigned int aHeaderMarkMicros, unsigned int aHeaderSpaceMicros,
439  unsigned int aOneMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroMarkMicros, unsigned int aZeroSpaceMicros,
440  IRRawDataType aData, uint_fast8_t aNumberOfBits, bool aMSBfirst, bool aSendStopBit, unsigned int aRepeatPeriodMillis,
441  int_fast8_t aNumberOfRepeats, void (*aSpecialSendRepeatFunction)() = NULL);
442  void sendPulseDistanceWidthData(unsigned int aOneMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroMarkMicros,
443  unsigned int aZeroSpaceMicros, IRRawDataType aData, uint_fast8_t aNumberOfBits, bool aMSBfirst, bool aSendStopBit);
444  void sendBiphaseData(unsigned int aBiphaseTimeUnit, uint32_t aData, uint_fast8_t aNumberOfBits);
445 
446  void mark(unsigned int aMarkMicros);
447  static void space(unsigned int aSpaceMicros);
448  void IRLedOff();
449 
450 // 8 Bit array
451  void sendRaw(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
452  void sendRaw_P(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
453 
454 // 16 Bit array
455  void sendRaw(const uint16_t aBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
456  void sendRaw_P(const uint16_t aBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
457 
458  /*
459  * New send functions
460  */
461  void sendBangOlufsen(uint16_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats = NO_REPEATS,
462  int8_t aNumberOfHeaderBits = 8);
463  void sendBangOlufsenDataLink(uint32_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats = NO_REPEATS,
464  int8_t aNumberOfHeaderBits = 8);
465  void sendBangOlufsenRaw(uint32_t aRawData, int_fast8_t aBits, bool aBackToBack = false);
466  void sendBangOlufsenRawDataLink(uint64_t aRawData, int_fast8_t aBits, bool aBackToBack = false,
467  bool aUseDatalinkTiming = false);
468  void sendBoseWave(uint8_t aCommand, int_fast8_t aNumberOfRepeats = NO_REPEATS);
469  void sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aSendSharp = false);
470  void sendDenonRaw(uint16_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS)
471 #if !defined (DOXYGEN)
472  __attribute__ ((deprecated ("Please use sendDenon(aAddress, aCommand, aNumberOfRepeats).")));
473 #endif
474  void sendJVC(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
475 
476  void sendLG2Repeat();
477  uint32_t computeLGRawDataAndChecksum(uint8_t aAddress, uint16_t aCommand);
478  void sendLG(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
479  void sendLG2(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
480  void sendLGRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
481 
482  void sendNECRepeat();
483  uint32_t computeNECRawDataAndChecksum(uint16_t aAddress, uint16_t aCommand);
484  void sendNEC(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
485  void sendNEC2(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
486  void sendNECRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
487  // NEC variants
488  void sendOnkyo(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
489  void sendApple(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
490 
491  void sendKaseikyo(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats, uint16_t aVendorCode); // LSB first
492  void sendPanasonic(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
493  void sendKaseikyo_Denon(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
494  void sendKaseikyo_Mitsubishi(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
495  void sendKaseikyo_Sharp(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
496  void sendKaseikyo_JVC(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
497 
498  void sendRC5(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle = true);
499  void sendRC6(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle = true);
500  void sendSamsungLGRepeat();
501  void sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
502  void sendSamsung48(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
503  void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
504  void sendSharp(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats); // redirected to sendDenon
505  void sendSony(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t numberOfBits = 12); // SIRCS_12_PROTOCOL
506 
507  void sendLegoPowerFunctions(uint8_t aChannel, uint8_t tCommand, uint8_t aMode, bool aDoSend5Times = true);
508  void sendLegoPowerFunctions(uint16_t aRawData, bool aDoSend5Times = true);
509  void sendLegoPowerFunctions(uint16_t aRawData, uint8_t aChannel, bool aDoSend5Times = true);
510 
511  void sendMagiQuest(uint32_t aWandId, uint16_t aMagnitude);
512 
513  void sendPronto(const __FlashStringHelper *str, int_fast8_t aNumberOfRepeats = NO_REPEATS);
514  void sendPronto(const char *prontoHexString, int_fast8_t aNumberOfRepeats = NO_REPEATS);
515  void sendPronto(const uint16_t *data, unsigned int length, int_fast8_t aNumberOfRepeats = NO_REPEATS);
516 
517 #if defined(__AVR__)
518  void sendPronto_PF(uint_farptr_t str, int_fast8_t aNumberOfRepeats = NO_REPEATS);
519  void sendPronto_P(const char *str, int_fast8_t aNumberOfRepeats);
520 #endif
521 
522 // Template protocol :-)
523  void sendShuzu(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
524 
525  /*
526  * OLD send functions
527  */
528  void sendDenon(unsigned long data, int nbits);
529  void sendDish(uint16_t aData);
530  void sendJVC(unsigned long data, int nbits,
531  bool repeat)
532  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendJVC(aAddress, aCommand, aNumberOfRepeats)."))) {
533  sendJVCMSB(data, nbits, repeat);
534  }
535  void sendJVCMSB(unsigned long data, int nbits, bool repeat = false);
536 
537  void sendLG(unsigned long data, int nbits);
538 
539  void sendNEC(uint32_t aRawData,
540  uint8_t nbits)
541  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendNECMSB() or sendNEC(aAddress, aCommand, aNumberOfRepeats)."))) {
542  sendNECMSB(aRawData, nbits);
543  }
544  void sendNECMSB(uint32_t data, uint8_t nbits, bool repeat = false);
545  void sendRC5(uint32_t data, uint8_t nbits);
546  void sendRC5ext(uint8_t addr, uint8_t cmd, bool toggle);
547  void sendRC6Raw(uint32_t data, uint8_t nbits);
548  void sendRC6(uint32_t data, uint8_t nbits) __attribute__ ((deprecated ("Please use sendRC6Raw().")));
549  void sendRC6Raw(uint64_t data, uint8_t nbits);
550  void sendRC6(uint64_t data, uint8_t nbits) __attribute__ ((deprecated ("Please use sendRC6Raw().")));;
551  void sendSharpRaw(unsigned long data, int nbits);
552  void sendSharp(unsigned int address, unsigned int command);
553  void sendSAMSUNG(unsigned long data, int nbits);
554  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendSamsung().")));
555  void sendSony(unsigned long data,
556  int nbits)
557  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendSony(aAddress, aCommand, aNumberOfRepeats).")));
558  ;
559  void sendWhynter(uint32_t aData, uint8_t aNumberOfBitsToSend);
560 
561 #if !defined(IR_SEND_PIN)
562  uint8_t sendPin;
563 #endif
564  unsigned int periodTimeMicros;
565  unsigned int periodOnTimeMicros; // compensated with PULSE_CORRECTION_NANOS for duration of digitalWrite. Around 8 microseconds for 38 kHz.
566  unsigned int getPulseCorrectionNanos();
567 
568  static void customDelayMicroseconds(unsigned long aMicroseconds);
569 };
570 
571 /*
572  * The sender instance
573  */
574 extern IRsend IrSender;
575 
576 void sendNECSpecialRepeat();
577 void sendLG2SpecialRepeat();
579 
580 #endif // _IR_REMOTE_INT_H
IRsend::sendShuzu
void sendShuzu(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Template.hpp:134
IRsend::sendLGRaw
void sendLGRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Here you can put your raw data, even one with "wrong" checksum.
Definition: ir_LG.hpp:294
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:155
IRsend::sendApple
void sendApple(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_NEC.hpp:200
IRsend::sendMagiQuest
void sendMagiQuest(uint32_t aWandId, uint16_t aMagnitude)
Definition: ir_MagiQuest.hpp:115
setFeedbackLED
void setFeedbackLED(bool aSwitchLedOn)
Flash LED while receiving or sending IR data.
Definition: IRFeedbackLED.hpp:108
IRsend::sendDish
void sendDish(uint16_t aData)
Definition: ir_Others.hpp:64
IRsend::sendNECRaw
void sendNECRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Definition: ir_NEC.hpp:218
IRrecv::stop
void stop()
Disables the timer for IR reception.
Definition: IRReceive.hpp:355
IRrecv::lastDecodedProtocol
decode_type_t lastDecodedProtocol
Definition: IRremoteInt.h:308
IRsend::aNumberOfRepeats
void uint8_t int_fast8_t aNumberOfRepeats
Definition: IRremoteInt.h:474
IRsend::sendPin
uint8_t sendPin
Definition: IRremoteInt.h:562
IRrecv::disableIRIn
void disableIRIn()
Alias for stop().
Definition: IRReceive.hpp:361
IRsend::sendKaseikyo_Sharp
void sendKaseikyo_Sharp(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats)
Stub using Kaseikyo with SHARP_VENDOR_ID_CODE.
Definition: ir_Kaseikyo.hpp:177
setBlinkPin
void setBlinkPin(uint8_t aFeedbackLEDPin) __attribute__((deprecated("Please use setLEDFeedback().")))
Old deprecated function name for setLEDFeedback()
Definition: IRFeedbackLED.hpp:153
IRrecv::enableIRIn
void enableIRIn()
Alias for start().
Definition: IRReceive.hpp:325
enableLEDFeedback
void enableLEDFeedback()
Definition: IRFeedbackLED.hpp:85
IRsend::sendBangOlufsenRaw
void sendBangOlufsenRaw(uint32_t aRawData, int_fast8_t aBits, bool aBackToBack=false)
Definition: ir_BangOlufsen.hpp:162
IRsend::setSendPin
void setSendPin(uint_fast8_t aSendPin)
Definition: IRSend.hpp:119
IRrecv::checkForRecordGapsMicros
bool checkForRecordGapsMicros(Print *aSerial)
Definition: IRReceive.hpp:1075
IRsend::sendBoseWave
void sendBoseWave(uint8_t aCommand, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Definition: ir_BoseWave.hpp:56
IRrecv::compare
uint_fast8_t compare(unsigned int oldval, unsigned int newval)
IRsend::sendSony
void sendSony(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t numberOfBits=12)
Definition: ir_Sony.hpp:103
disableLEDFeedbackForSend
void disableLEDFeedbackForSend()
Definition: IRFeedbackLED.hpp:97
IRrecv::registerReceiveCompleteCallback
void registerReceiveCompleteCallback(void(*aReceiveCompleteCallbackFunction)(void))
Sets the function to call if a protocol message has arrived.
Definition: IRReceive.hpp:299
IRrecv
Main class for receiving IR signals.
Definition: IRremoteInt.h:172
NO_REPEATS
#define NO_REPEATS
Just for better readability of code.
Definition: IRremoteInt.h:392
IRsend::mark
void mark(unsigned int aMarkMicros)
Sends an IR mark for the specified number of microseconds.
Definition: IRSend.hpp:757
IRsend::sendRC6Raw
void sendRC6Raw(uint32_t data, uint8_t nbits)
Definition: ir_RC5_RC6.hpp:285
IRrecv::decodeDistanceWidth
bool decodeDistanceWidth()
Definition: ir_DistanceWidthProtocol.hpp:139
IRsend::sendSamsungLGRepeat
void sendSamsungLGRepeat()
Send repeat Repeat commands should be sent in a 110 ms raster.
Definition: ir_Samsung.hpp:111
IRsend::periodTimeMicros
unsigned int periodTimeMicros
Definition: IRremoteInt.h:564
disableLEDFeedbackForReceive
constexpr auto disableLEDFeedbackForReceive
Definition: IRremoteInt.h:348
IRsend::sendRC6
void sendRC6(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle=true)
Assemble raw data for RC6 from parameters and toggle state and send We do not wait for the minimal tr...
Definition: ir_RC5_RC6.hpp:357
decode_results::overflow
bool overflow
Definition: IRremoteInt.h:168
decode_type_t
decode_type_t
An enum consisting of all supported formats.
Definition: IRProtocol.h:40
IRrecv::restartAfterSend
void restartAfterSend()
Restarts receiver after send.
Definition: IRReceive.hpp:346
MATCH
bool MATCH(unsigned int measured, unsigned int desired)
Definition: IRReceive.hpp:993
IRsend::customDelayMicroseconds
static void customDelayMicroseconds(unsigned long aMicroseconds)
Custom delay function that circumvents Arduino's delayMicroseconds 16 bit limit and is (mostly) not e...
Definition: IRSend.hpp:935
IRsend::sendPulseDistanceWidth
void sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Sends PulseDistance frames and repeats.
Definition: IRSend.hpp:532
IRrecv::IRrecv
IRrecv()
Instantiate the IRrecv class.
Definition: IRReceive.hpp:70
sBiphaseDecodeRawbuffOffset
uint_fast8_t sBiphaseDecodeRawbuffOffset
Definition: IRReceive.hpp:779
IRsend::IRsend
IRsend()
Definition: IRSend.hpp:61
IRrecv::decodeSharp
bool decodeSharp()
Definition: ir_Denon.hpp:154
IRrecv::blink13
void blink13(uint8_t aEnableLEDFeedback) __attribute__((deprecated("Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback().")))
Old deprecated function name for setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback()
Definition: IRFeedbackLED.hpp:147
IRrecv::printIRResultAsCVariables
void printIRResultAsCVariables(Print *aSerial)
Print results as C variables to be used for sendXXX()
Definition: IRReceive.hpp:1554
IRsend::sendNEC
void sendNEC(uint32_t aRawData, uint8_t nbits) __attribute__((deprecated("This old function sends MSB first! Please use sendNECMSB() or sendNEC(aAddress
MATCH_SPACE
bool MATCH_SPACE(unsigned int measured_ticks, unsigned int desired_us)
Definition: IRReceive.hpp:1059
IRsend::sendWhynter
void sendWhynter(uint32_t aData, uint8_t aNumberOfBitsToSend)
Definition: ir_Others.hpp:90
decode_results::rawbuf
unsigned int * rawbuf
Definition: IRremoteInt.h:166
IRsend::__attribute__
__attribute__((deprecated("This old function sends MSB first! Please use sendSamsung().")))
IRrecv::initBiphaselevel
void initBiphaselevel(uint_fast8_t aRCDecodeRawbuffOffset, unsigned int aBiphaseTimeUnit)
Definition: IRReceive.hpp:784
decode_results::bits
uint8_t bits
Definition: IRremoteInt.h:161
decode_results::decode_type
decode_type_t decode_type
Definition: IRremoteInt.h:158
irparams_struct::ReceiveCompleteCallbackFunction
void(* ReceiveCompleteCallbackFunction)(void)
The function to call if a protocol message has arrived, i.e. StateForISR changed to IR_REC_STATE_STOP...
Definition: IRremoteInt.h:105
IRrecv::begin
void begin(uint_fast8_t aReceivePin, bool aEnableLEDFeedback=false, uint_fast8_t aFeedbackLEDPin=USE_DEFAULT_FEEDBACK_LED_PIN)
Initializes the receive and feedback pin.
Definition: IRReceive.hpp:263
IRsend::sendRaw_P
void sendRaw_P(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz)
New function using an 8 byte tick timing array in FLASH to save program memory Raw data starts with a...
Definition: IRSend.hpp:354
IRrecv::decodeSonyMSB
bool decodeSonyMSB(decode_results *aResults)
Definition: ir_Sony.hpp:154
IRsend::getPulseCorrectionNanos
unsigned int getPulseCorrectionNanos()
Definition: IRSend.hpp:998
IRsend::sendBiphaseData
void sendBiphaseData(unsigned int aBiphaseTimeUnit, uint32_t aData, uint_fast8_t aNumberOfBits)
Sends Biphase data MSB first Always send start bit, do not send the trailing space of the start bit 0...
Definition: IRSend.hpp:706
IRrecv::compensateAndStorePronto
size_t compensateAndStorePronto(String *aString, unsigned int frequency=38000U)
Definition: ir_Pronto.hpp:322
IRsend
Main class for sending IR signals.
Definition: IRremoteInt.h:400
IRrecv::decodeSony
bool decodeSony()
Definition: ir_Sony.hpp:109
irparams_struct
This struct contains the data and control used for receiver static functions and the ISR (interrupt s...
Definition: IRremoteInt.h:95
sendLG2SpecialRepeat
void sendLG2SpecialRepeat()
Static function for sending special repeat frame.
Definition: ir_LG.hpp:145
IRrecv::read
IRData * read()
If IR receiver data is available, returns pointer to IrReceiver.decodedIRData, else NULL.
Definition: IRReceive.hpp:434
IRrecv::getBiphaselevel
uint_fast8_t getBiphaselevel()
Gets the level of one time interval (aBiphaseTimeUnit) at a time from the raw buffer.
Definition: IRReceive.hpp:806
irparams_struct::rawlen
uint_fast8_t rawlen
counter of entries in rawbuf
Definition: IRremoteInt.h:109
IRrecv::decodeHashOld
bool decodeHashOld(decode_results *aResults)
IRrecv::decodePulseDistanceWidthData
bool decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
Definition: IRReceive.hpp:768
IRrecv::decodeLGMSB
bool decodeLGMSB(decode_results *aResults)
Definition: ir_LG.hpp:298
IRsend::sendSamsung
void sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Here we send Samsung32 If we get a command < 0x100, we send command and then ~command.
Definition: ir_Samsung.hpp:162
decode_results::value
uint32_t value
Definition: IRremoteInt.h:160
IRsend::sendNEC2
void sendNEC2(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_NEC.hpp:177
IRrecv::decodeSAMSUNG
bool decodeSAMSUNG(decode_results *aResults)
Definition: ir_Samsung.hpp:310
IRrecv::decodeBangOlufsen
bool decodeBangOlufsen()
Definition: ir_BangOlufsen.hpp:286
IRrecv::decodeLegoPowerFunctions
bool decodeLegoPowerFunctions()
Definition: ir_Lego.hpp:127
irparams_struct::OverflowFlag
bool OverflowFlag
Raw buffer OverflowFlag occurred.
Definition: IRremoteInt.h:107
IRsend::sendRaw
void sendRaw(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz)
Function using an 8 byte tick timing array to save program memory Raw data starts with a Mark.
Definition: IRSend.hpp:303
PulseDistanceWidthProtocolConstants
Definition: IRProtocol.h:74
IRsend::sendJVC
void sendJVC(unsigned long data, int nbits, bool repeat) __attribute__((deprecated("This old function sends MSB first! Please use sendJVC(aAddress
The JVC protocol repeats by skipping the header mark and space -> this leads to a poor repeat detecti...
Definition: ir_JVC.hpp:91
IRrecv::decodePanasonicMSB
bool decodePanasonicMSB(decode_results *aResults)
IRrecv::decodedIRData
IRData decodedIRData
Definition: IRremoteInt.h:305
IRData
Data structure for the user application, available as decodedIRData.
Definition: IRProtocol.h:115
IRsend::sendLG2Repeat
void sendLG2Repeat()
Definition: ir_LG.hpp:131
matchSpace
bool matchSpace(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros)
Compensate for spaces shortened by demodulator hardware.
Definition: IRReceive.hpp:1033
IRsend::sendPulseDistanceWidthFromArray
void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, unsigned int aHeaderMarkMicros, unsigned int aHeaderSpaceMicros, unsigned int aOneMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroMarkMicros, unsigned int aZeroSpaceMicros, IRRawDataType *aDecodedRawDataArray, unsigned int aNumberOfBits, bool aMSBfirst, bool aSendStopBit, unsigned int aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats)
Sends PulseDistance data from array For LSB First the LSB of array[0] is sent first then all bits unt...
Definition: IRSend.hpp:383
IRrecv::decodeSamsung
bool decodeSamsung()
Definition: ir_Samsung.hpp:212
IRsend::sendSamsungLG
void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Samsung.hpp:143
IRsend::sendRC5ext
void sendRC5ext(uint8_t addr, uint8_t cmd, bool toggle)
Definition: ir_RC5_RC6.hpp:558
MATCH_MARK
bool MATCH_MARK(unsigned int measured_ticks, unsigned int desired_us)
Definition: IRReceive.hpp:1026
sendSamsungLGSpecialRepeat
void sendSamsungLGSpecialRepeat()
Static function for sending special repeat frame.
Definition: ir_Samsung.hpp:127
disableLEDFeedback
void disableLEDFeedback()
Definition: IRFeedbackLED.hpp:89
IRrecv::printIRResultShort
bool printIRResultShort(Print *aSerial, bool aPrintRepeatGap=true, bool aCheckForRecordGapsMicros=true)
Function to print values and flags of IrReceiver.decodedIRData in one line.
Definition: IRReceive.hpp:1171
IRsend::sendBangOlufsenDataLink
void sendBangOlufsenDataLink(uint32_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats=NO_REPEATS, int8_t aNumberOfHeaderBits=8)
Definition: ir_BangOlufsen.hpp:153
IRrecv::checkForRepeatSpaceAndSetFlag
void checkForRepeatSpaceAndSetFlag(unsigned int aMediumRepeatSpaceMicros)
Definition: IRReceive.hpp:962
IRsend::sendSharp
void sendSharp(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Denon.hpp:116
IRrecv::checkHeader
bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants)
Definition: IRReceive.hpp:943
IRsend::sendKaseikyo
void sendKaseikyo(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats, uint16_t aVendorCode)
Address can be interpreted as sub-device << 8 + device.
Definition: ir_Kaseikyo.hpp:124
irparams_struct::rawbuf
unsigned int rawbuf[RAW_BUFFER_LENGTH]
raw data / tick counts per mark/space, first entry is the length of the gap between previous and curr...
Definition: IRremoteInt.h:113
IRsend::begin
void begin(uint_fast8_t aSendPin)
Initializes the send pin and enable LED feedback with board specific FEEDBACK_LED_ON() and FEEDBACK_L...
Definition: IRSend.hpp:112
IRsend::sendNECMSB
void sendNECMSB(uint32_t data, uint8_t nbits, bool repeat=false)
With Send sendNECMSB() you can send your old 32 bit codes.
Definition: ir_NEC.hpp:397
IRsend::sendKaseikyo_JVC
void sendKaseikyo_JVC(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats)
Stub using Kaseikyo with JVC_VENDOR_ID_CODE.
Definition: ir_Kaseikyo.hpp:184
IRrecv::printActiveIRProtocols
static void printActiveIRProtocols(Print *aSerial)
Definition: IRReceive.hpp:1100
printActiveIRProtocols
void printActiveIRProtocols(Print *aSerial)
Definition: IRReceive.hpp:1104
IRsend::computeLGRawDataAndChecksum
uint32_t computeLGRawDataAndChecksum(uint8_t aAddress, uint16_t aCommand)
Definition: ir_LG.hpp:155
IRrecv::decodeHash
bool decodeHash()
IRrecv::isIdle
bool isIdle()
Returns status of reception.
Definition: IRReceive.hpp:375
IRsend::sendPanasonic
void sendPanasonic(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats)
Stub using Kaseikyo with PANASONIC_VENDOR_ID_CODE.
Definition: ir_Kaseikyo.hpp:156
getMarkExcessMicros
int getMarkExcessMicros()
Getter function for MARK_EXCESS_MICROS.
Definition: IRReceive.hpp:1066
IRrecv::compensateAndPrintIRResultAsCArray
void compensateAndPrintIRResultAsCArray(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
Dump out the IrReceiver.decodedIRData.rawDataPtr->rawbuf[] to be used as C definition for sendRaw().
Definition: IRReceive.hpp:1467
matchTicks
bool matchTicks(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros)
Match function without compensating for marks exceeded or spaces shortened by demodulator hardware Cu...
Definition: IRReceive.hpp:973
IRrecv::compensateAndPrintIRResultAsPronto
void compensateAndPrintIRResultAsPronto(Print *aSerial, unsigned int frequency=38000U)
Print the result (second argument) as Pronto Hex on the Print supplied as argument.
Definition: ir_Pronto.hpp:254
IRsend::write
size_t write(IRData *aIRSendData, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Interprets and sends a IRData structure.
Definition: IRSend.hpp:155
irparams_struct::TickCounterForISR
volatile uint_fast16_t TickCounterForISR
Counts 50uS ticks. The value is copied into the rawbuf array on every transition.
Definition: IRremoteInt.h:103
IRsend::sendDenon
void sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aSendSharp=false)
Definition: ir_Denon.hpp:120
irparams_struct::StateForISR
volatile uint8_t StateForISR
State Machine state.
Definition: IRremoteInt.h:97
IRrecv::setReceivePin
void setReceivePin(uint_fast8_t aReceivePinNumber)
Sets / changes the receiver pin number.
Definition: IRReceive.hpp:286
IRrecv::decodeDenonOld
bool decodeDenonOld(decode_results *aResults)
Definition: ir_Denon.hpp:286
IRRawDataType
uint32_t IRRawDataType
Definition: IRremoteInt.h:117
IRrecv::start
void start()
Start the receiving process.
Definition: IRReceive.hpp:308
IRrecv::compensateAndStoreIRResultInArray
void compensateAndStoreIRResultInArray(uint8_t *aArrayPtr)
Store the decodedIRData to be used for sendRaw().
Definition: IRReceive.hpp:1527
enableLEDFeedbackForSend
void enableLEDFeedbackForSend()
Definition: IRFeedbackLED.hpp:93
IRsend::computeNECRawDataAndChecksum
uint32_t computeNECRawDataAndChecksum(uint16_t aAddress, uint16_t aCommand)
Definition: ir_NEC.hpp:144
IRrecv::printIRResultMinimal
void printIRResultMinimal(Print *aSerial)
Function to print protocol number, address, command, raw data and repeat flag of IrReceiver....
Definition: IRReceive.hpp:1326
IRrecv::initDecodedIRData
void initDecodedIRData()
Is internally called by decode before calling decoders.
Definition: IRReceive.hpp:396
IRsend::sendPronto
void sendPronto(const __FlashStringHelper *str, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Definition: ir_Pronto.hpp:190
decode_results::address
uint16_t address
Definition: IRremoteInt.h:159
IrSender
IRsend IrSender
Definition: IRSend.hpp:59
IRProtocol.h
Common declarations for receiving and sending.
IRsend::sendJVCMSB
void sendJVCMSB(unsigned long data, int nbits, bool repeat=false)
With Send sendJVCMSB() you can send your old 32 bit codes.
Definition: ir_JVC.hpp:242
IRrecv::lastDecodedCommand
uint32_t lastDecodedCommand
Definition: IRremoteInt.h:310
IRsend::space
static void space(unsigned int aSpaceMicros)
Sends an IR space for the specified number of microseconds.
Definition: IRSend.hpp:927
IRrecv::decodeRC5
bool decodeRC5()
Try to decode data as RC5 protocol.
Definition: ir_RC5_RC6.hpp:157
IRrecv::decodeBoseWave
bool decodeBoseWave()
Definition: ir_BoseWave.hpp:63
IRrecv::decodeBiPhaseData
bool decodeBiPhaseData(uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, uint_fast8_t aStartClockCount, uint_fast8_t aValueOfSpaceToMarkTransition, unsigned int aBiphaseTimeUnit)
IRrecv::available
bool available()
Returns true if IR receiver data is available.
Definition: IRReceive.hpp:427
IRsend::sendSamsung48
void sendSamsung48(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Here we send Samsung48 We send 2 x (8 bit command and then ~command)
Definition: ir_Samsung.hpp:181
IRrecv::decodeMagiQuest
bool decodeMagiQuest()
Definition: ir_MagiQuest.hpp:151
IRsend::sendDenonRaw
void sendDenonRaw(uint16_t aRawData, int_fast8_t aNumberOfRepeats=NO_REPEATS) void sendJVC(uint8_t aAddress
Definition: ir_Denon.hpp:252
IRsend::sendRC5
void sendRC5(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle=true)
Definition: ir_RC5_RC6.hpp:102
enableLEDFeedbackForReceive
constexpr auto enableLEDFeedbackForReceive
Definition: IRremoteInt.h:346
decode_results::magnitude
uint16_t magnitude
Definition: IRremoteInt.h:162
IRsend::periodOnTimeMicros
unsigned int periodOnTimeMicros
Definition: IRremoteInt.h:565
IRrecv::end
void end()
Alias for stop().
Definition: IRReceive.hpp:367
IRsend::sendKaseikyo_Mitsubishi
void sendKaseikyo_Mitsubishi(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats)
Stub using Kaseikyo with MITSUBISHI_VENDOR_ID_CODE.
Definition: ir_Kaseikyo.hpp:170
IRrecv::decodeNECMSB
bool decodeNECMSB(decode_results *aResults)
Definition: ir_NEC.hpp:323
IRsend::sendBangOlufsenRawDataLink
void sendBangOlufsenRawDataLink(uint64_t aRawData, int_fast8_t aBits, bool aBackToBack=false, bool aUseDatalinkTiming=false)
Definition: ir_BangOlufsen.hpp:222
IRrecv::decodeNEC
bool decodeNEC()
Decodes also Onkyo and Apple.
Definition: ir_NEC.hpp:225
IRsend::sendNECRepeat
void sendNECRepeat()
Send special NEC repeat frame Repeat commands should be sent in a 110 ms raster.
Definition: ir_NEC.hpp:120
IRrecv::printIRSendUsage
void printIRSendUsage(Print *aSerial)
Function to print values and flags of IrReceiver.decodedIRData in one line.
Definition: IRReceive.hpp:1186
IRsend::sendSAMSUNG
void sendSAMSUNG(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:352
IRsend::IRLedOff
void IRLedOff()
Just switch the IR sending LED off to send an IR space A space is "no output", so the PWM output is d...
Definition: IRSend.hpp:894
IRrecv::decodeDenon
bool decodeDenon()
Definition: ir_Denon.hpp:158
IRrecv::decodeLG
bool decodeLG()
Definition: ir_LG.hpp:184
IRsend::sendPulseDistanceWidthData
void sendPulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits)
Sends PulseDistance data The output always ends with a space Each additional call costs 16 bytes prog...
Definition: IRSend.hpp:643
IRrecv::decode
bool decode()
The main decode function, attempts to decode the recently receive IR signal.
Definition: IRReceive.hpp:451
IRrecv::decodeJVC
bool decodeJVC()
Definition: ir_JVC.hpp:121
IRsend::sendSharpRaw
void sendSharpRaw(unsigned long data, int nbits)
RAW_BUFFER_LENGTH
#define RAW_BUFFER_LENGTH
The length of the buffer where the IR timing data is stored before decoding 100 is sufficient for mos...
Definition: IRremoteInt.h:74
IRrecv::lastDecodedAddress
uint32_t lastDecodedAddress
Definition: IRremoteInt.h:309
IRsend::sendOnkyo
void sendOnkyo(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_NEC.hpp:187
IRrecv::decodeKaseikyo
bool decodeKaseikyo()
Definition: ir_Kaseikyo.hpp:191
IRsend::sendLegoPowerFunctions
void sendLegoPowerFunctions(uint8_t aChannel, uint8_t tCommand, uint8_t aMode, bool aDoSend5Times=true)
Definition: ir_Lego.hpp:96
matchMark
bool matchMark(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
Definition: IRReceive.hpp:1000
USE_DEFAULT_FEEDBACK_LED_PIN
#define USE_DEFAULT_FEEDBACK_LED_PIN
Definition: IRremoteInt.h:64
decode_results::rawlen
uint_fast8_t rawlen
Definition: IRremoteInt.h:167
IRrecv::decodeRC6
bool decodeRC6()
Try to decode data as RC6 protocol.
Definition: ir_RC5_RC6.hpp:401
IRrecv::getProtocolString
const char * getProtocolString()
Definition: IRReceive.hpp:1593
IRsend::sendLG
void sendLG(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
LG uses the NEC repeat.
Definition: ir_LG.hpp:173
IRsend::sendBangOlufsen
void sendBangOlufsen(uint16_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats=NO_REPEATS, int8_t aNumberOfHeaderBits=8)
Definition: ir_BangOlufsen.hpp:147
IRrecv::resume
void resume()
Restart the ISR (Interrupt Service Routine) state machine, to enable receiving of the next IR frame.
Definition: IRReceive.hpp:382
IRrecv::decodeShuzu
bool decodeShuzu()
Definition: ir_Template.hpp:139
IRrecv::startWithTicksToAdd
void startWithTicksToAdd(uint16_t aTicksToAddToGapCounter)
Definition: IRReceive.hpp:338
IRsend::aCommand
void uint8_t aCommand
Definition: IRremoteInt.h:474
IrReceiver
IRrecv IrReceiver
The receiver instance.
Definition: IRReceive.hpp:59
IRsend::enableIROut
void enableIROut(uint_fast8_t aFrequencyKHz)
Enables IR output.
Definition: IRSend.hpp:961
IRsend::sendKaseikyo_Denon
void sendKaseikyo_Denon(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats)
Stub using Kaseikyo with DENON_VENDOR_ID_CODE.
Definition: ir_Kaseikyo.hpp:163
IRrecv::printIRResultRawFormatted
void printIRResultRawFormatted(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
Dump out the timings in IrReceiver.decodedIRData.rawDataPtr->rawbuf[] array 8 values per line.
Definition: IRReceive.hpp:1370
IRsend::sendLG2
void sendLG2(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
LG2 uses a special repeat.
Definition: ir_LG.hpp:180
decode_results::isRepeat
bool isRepeat
Definition: IRremoteInt.h:163
IRrecv::decodeJVCMSB
bool decodeJVCMSB(decode_results *aResults)
Definition: ir_JVC.hpp:178
sendNECSpecialRepeat
void sendNECSpecialRepeat()
Static function for sending special repeat frame.
Definition: ir_NEC.hpp:134
setLEDFeedback
void setLEDFeedback(uint8_t aFeedbackLEDPin, uint8_t aEnableLEDFeedback)
Enable blinking of feedback LED (LED_BUILTIN is taken as default) on IR sending and receiving Cannot ...
Definition: IRFeedbackLED.hpp:56
IRrecv::decodeWhynter
bool decodeWhynter()
Definition: ir_Others.hpp:94
IRrecv::repeatCount
uint8_t repeatCount
Definition: IRremoteInt.h:312
IRsend::sendNEC
void sendNEC(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
NEC Send frame and special repeats There is NO delay after the last sent repeat!
Definition: ir_NEC.hpp:168
irparams_struct::IRReceivePin
uint_fast8_t IRReceivePin
Pin connected to IR data from detector.
Definition: IRremoteInt.h:98