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 SPACE 0
39 #define MARK 1
40 #define NO_MARK_OR_SPACE 2 // Used as return value for getBiphaselevel()
41 
42 #if defined(PARTICLE)
43 #define F_CPU 16000000 // definition for a board for which F_CPU is not defined
44 #endif
45 #if defined(F_CPU) // F_CPU is used to generate the receive send timings in some CPU's
46 #define CLOCKS_PER_MICRO (F_CPU / MICROS_IN_ONE_SECOND)
47 #endif
48 
49 /*
50  * For backwards compatibility
51  */
52 #if defined(SYSCLOCK) // allow for processor specific code to define F_CPU
53 #undef F_CPU
54 #define F_CPU SYSCLOCK // Clock frequency to be used for timing.
55 #endif
56 
57 //#define DEBUG // Activate this for lots of lovely debug output from the IRremote core and all protocol decoders.
58 //#define TRACE // Activate this for more debug output.
59 
69 #if !defined(RAW_BUFFER_LENGTH)
70 # if (defined(RAMEND) && RAMEND <= 0x2FF) || (defined(RAMSIZE) && RAMSIZE < 0x2FF)
71 // for RAMsize <= 512 bytes
72 #define RAW_BUFFER_LENGTH 100
73 # elif (defined(RAMEND) && RAMEND <= 0x8FF) || (defined(RAMSIZE) && RAMSIZE < 0x8FF)
74 // for RAMsize <= 2k
75 #define RAW_BUFFER_LENGTH 200
76 # else
77 // For undefined or bigger RAMsize
78 #define RAW_BUFFER_LENGTH 750 // The value for air condition remotes.
79 # endif
80 #endif
81 #if RAW_BUFFER_LENGTH % 2 == 1
82 #error RAW_BUFFER_LENGTH must be even, since the array consists of space / mark pairs.
83 #endif
84 
85 #if RAW_BUFFER_LENGTH <= 254 // saves around 75 bytes program memory and speeds up ISR
86 typedef uint_fast8_t IRRawlenType;
87 #else
88 typedef unsigned int IRRawlenType;
89 #endif
90 
91 /*
92  * We store IR timing values in an 8-bit buffer, where each unit represents 50 ticks.
93  * Since 8 bits can hold values from 0 to 255, the maximum measurable timing is 255 × 50 ticks = 12750 us.
94  *
95  * This means:
96  * - Any timing up to 12750 us is stored accurately.
97  * - Any timing greater than 12750 us is clipped and stored as 12750 us.
98  * - Therefore, you can detect that a timing exceeded 12750 us (because it appears as 12750 us).
99  * - However, you cannot distinguish between two different timings if both are greater than 12750 us — they will both appear as the same maximum value.
100  *
101  * For decoding purposes, 8 bits are acceptable as long as the protocol does not require distinguishing between two different timings
102  * that are both longer than 12750 us.
103  * As I am not currently (02/2026) aware of any protocols that require this, we use 8 bits.
104  * Use a 16-bit buffer if raw timing capture is required and exact values above 12750 us must be preserved.
105  */
106 #if !defined(USE_16_BIT_TIMING_BUFFER) // Use uint16_t buffer for timing. Doubles the RAM requirement. this can be used to override our selection of 8 the bit array
107 typedef uint8_t IRRawbufType; // all timings up to 12750 us fit into 8 bit (for MICROS_PER_TICK == 50).
108 #else
109 typedef uint16_t IRRawbufType; // Use 16 bit array
110 #endif
111 
112 /**********************************************************
113  * Declarations for the receiver Interrupt Service Routine
114  **********************************************************/
115 // ISR State-Machine : Receiver States
116 #define IR_REC_STATE_IDLE 0 // Counting the gap time and waiting for the start bit to arrive
117 #define IR_REC_STATE_MARK 1 // A mark was received and we are counting the duration of it.
118 #define IR_REC_STATE_SPACE 2 // A space was received and we are counting the duration of it. If space is too long, we assume end of frame.
119 #define IR_REC_STATE_STOP 3 // Stopped until set to IR_REC_STATE_IDLE which can only be done by resume()
120 
126  // The fields are ordered to reduce memory overflow caused by struct-padding
127  volatile uint8_t StateForISR;
128  uint_fast8_t IRReceivePin;
129 #if defined(__AVR__)
130  volatile uint8_t *IRReceivePinPortInputRegister;
131  uint8_t IRReceivePinMask;
132 #endif
133  volatile uint_fast16_t TickCounterForISR;
134 #if !defined(IR_REMOTE_DISABLE_RECEIVE_COMPLETE_CALLBACK)
136 #endif
137 #if defined(DECODE_RC5) || defined(DECODE_RC6) || defined(DECODE_MARANTZ)
138  // Static variables for the getBiphaselevel() function
139  uint_fast8_t RawbuffOffsetForNextBiphaseLevel; // Index into raw timing array
140  uint16_t NumberOfTimingIntervalsInCurrentInterval; // 1, 2 or 3. Number of aBiphaseTimeUnit intervals of the current rawbuf[RawbuffOffsetForNextBiphaseLevel] timing.
141  uint_fast8_t AlreadyUsedTimingIntervalsOfCurrentInterval; // Number of already used intervals of sCurrentTimingIntervals.
142  uint16_t BiphaseTimeUnit;
143 #endif
146  uint16_t initialGapTicks;
148 };
149 
150 #if (__INT_WIDTH__ < 32)
151 typedef uint32_t IRDecodedRawDataType;
152 #define BITS_IN_DECODED_RAW_DATA_TYPE 32
153 #else
154 typedef uint64_t IRDecodedRawDataType;
155 #define BITS_IN_DECODED_RAW_DATA_TYPE 64
156 #endif
157 #define DECODED_RAW_DATA_ARRAY_SIZE ((((RAW_BUFFER_LENGTH - 2) - 1) / (2 * BITS_IN_DECODED_RAW_DATA_TYPE)) + 1) // The -2 is for initial gap + stop bit mark, 128 mark + spaces for 64 bit.
158 
162 struct IRData {
164  uint16_t address;
165  uint16_t command;
166  uint16_t extra;
168 #if defined(DECODE_DISTANCE_WIDTH)
169  // This replaces the address, command, extra and decodedRawData in case of protocol == PULSE_DISTANCE or -rather seldom- protocol == PULSE_WIDTH.
170  DistanceWidthTimingInfoStruct DistanceWidthTimingInfo; // 12 bytes
172 #endif
173  uint16_t numberOfBits;
174  uint8_t flags;
175 
176  /*
177  * These 2 variables allow to call resume() directly after decode.
178  * After resume(), irparams.initialGapTicks and irparams.rawlen are
179  * the first variables, which are overwritten by the next received frame.
180  * since 4.3.0.
181  */
183  uint16_t initialGapTicks;
184 };
185 
186 /****************************************************
187  * RECEIVING
188  ****************************************************/
189 
194  decode_type_t decode_type; // deprecated, moved to decodedIRData.protocol ///< UNKNOWN, NEC, SONY, RC5, ...
195  uint16_t address; // Used by Panasonic & Sharp [16-bits]
196  uint32_t value; // deprecated, moved to decodedIRData.decodedRawData ///< Decoded value / command [max 32-bits]
197  uint8_t bits; // deprecated, moved to decodedIRData.numberOfBits ///< Number of bits in decoded value
198  uint16_t magnitude; // deprecated, moved to decodedIRData.extra ///< Used by MagiQuest [16-bits]
199  bool isRepeat; // deprecated, moved to decodedIRData.flags ///< True if repeat of value is detected
200 
201 // next 3 values are copies of irparams_struct values - see above
202  uint16_t *rawbuf; // deprecated, moved to irparams.rawbuf ///< Raw intervals in 50uS ticks
203  uint_fast8_t rawlen; // deprecated, moved to irparams.rawlen ///< Number of records in rawbuf
204  bool overflow; // deprecated, moved to decodedIRData.flags ///< true if IR raw code too long
205 };
206 
207 extern unsigned long sMicrosAtLastStopTimer; // Used to adjust TickCounterForISR with uncounted ticks between stopTimer() and restartTimer()
208 
212 #define USE_DEFAULT_FEEDBACK_LED_PIN 0xFF // we need it here
213 class IRrecv {
214 public:
215 
216  IRrecv();
217 #if defined(SUPPORT_MULTIPLE_RECEIVER_INSTANCES)
218  IRrecv(uint_fast8_t aReceivePin);
219  IRrecv(uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin);
220 #else
221  IRrecv(
222  uint_fast8_t aReceivePin)
223  __attribute__ ((deprecated ("Please use the default IRrecv instance \"IrReceiver\" and IrReceiver.begin(), and not your own IRrecv instance.")));
224  IRrecv(uint_fast8_t aReceivePin,
225  uint_fast8_t aFeedbackLEDPin)
226  __attribute__ ((deprecated ("Please use the default IRrecv instance \"IrReceiver\" and IrReceiver.begin(), and not your own IRrecv instance..")));
227 #endif
228  void setReceivePin(uint_fast8_t aReceivePinNumber);
229 #if !defined(IR_REMOTE_DISABLE_RECEIVE_COMPLETE_CALLBACK)
230  void registerReceiveCompleteCallback(void (*aReceiveCompleteCallbackFunction)(void));
231 #endif
233 
234  /*
235  * Stream like API
236  */
237  void begin(uint_fast8_t aReceivePin, bool aEnableLEDFeedback = false, uint_fast8_t aFeedbackLEDPin =
239  void start();
240  void enableIRIn(); // alias for start
241  void restartTimer();
242  void restartTimer(uint32_t aMicrosecondsToAddToGapCounter);
243  void restartTimerWithTicksToAdd(uint16_t aTicksToAddToGapCounter);
244  void restartAfterSend();
245 
246  bool available();
247  IRData* read(); // returns decoded data
248  // write is a method of class IRsend below
249  // size_t write(IRData *aIRSendData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
250  void stopTimer();
251  void stop();
252  void disableIRIn(); // alias for stop
253  void end(); // alias for stop
254 
255  bool isIdle();
256 
257  /*
258  * The main functions
259  */
260  bool decode(); // Check if available and try to decode
261  void resume(); // Enable receiving of the next value
262 
263  /*
264  * Useful info and print functions
265  */
266  void printIRResultMinimal(Print *aSerial);
267  void printIRDuration(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks);
268  void printIRResultRawFormatted(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks = true);
269  void printIRResultAsCVariables(Print *aSerial);
272  uint8_t getMaximumTicksFromRawData(bool aSearchSpaceInsteadOfMark);
273  uint32_t getTotalDurationOfRawData();
274 
275  /*
276  * Next 4 functions are also available as non member functions
277  */
278  bool printIRResultShort(Print *aSerial, bool aPrintRepeatGap, bool aCheckForRecordGapsMicros)
279  __attribute__ ((deprecated ("Remove second parameter, it is not supported any more.")));
280  bool printIRResultShort(Print *aSerial, bool aCheckForRecordGapsMicros = true);
281  void printDistanceWidthTimingInfo(Print *aSerial, DistanceWidthTimingInfoStruct *aDistanceWidthTimingInfo);
282  void printIRSendUsage(Print *aSerial);
283 #if defined(__AVR__)
284  const __FlashStringHelper* getProtocolString();
285 #else
286  const char* getProtocolString();
287 #endif
288  static void printActiveIRProtocols(Print *aSerial);
289 
290  void printIRResultAsCArray(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks = true, bool aDoCompensate = true);
291  void compensateAndPrintIRResultAsCArray(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks = true);
292  void compensateAndPrintIRResultAsPronto(Print *aSerial, uint16_t frequency = 38000U);
293 
294  /*
295  * Store the data for further processing
296  */
297  void compensateAndStoreIRResultInArray(uint8_t *aArrayPtr);
298  size_t compensateAndStorePronto(String *aString, uint16_t frequency = 38000U);
299 
300  /*
301  * The main decoding functions used by the individual decoders
302  */
303 #if defined(USE_STRICT_DECODER)
304  bool
305 #else
306  void
307 #endif
308  decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits,
309  IRRawlenType aStartOffset = 3);
310 
312  uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset = 3);
313 
314  void decodePulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMicros,
315  bool aIsPulseWidthProtocol, bool aMSBfirst);
316 
317  void decodeWithThresholdPulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset,
318  uint16_t aOneThresholdMicros, bool aIsPulseWidthProtocol, bool aMSBfirst);
319 
320  void decodePulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros,
321  uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, bool aMSBfirst);
322 
323  void decodePulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros,
324  uint16_t aZeroMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst)
325  __attribute__ ((deprecated ("Please use decodePulseDistanceWidthData() with 6 parameters.")));
326 
327  bool decodeStrictPulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros,
328  uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst);
329 
330 #if defined(DECODE_RC5) || defined(DECODE_MARANTZ) || defined(DECODE_RC6)
331  void initBiphaselevel(uint_fast8_t aRCDecodeRawbuffOffset, uint16_t aBiphaseTimeUnit);
332  static uint8_t getNumberOfUnitsInInterval(uint16_t aCurrentInterval, uint16_t aTimeUnit);
333  uint_fast8_t getBiphaselevel();
334 #endif
335 
336  /*
337  * All standard (decode address + command) protocol decoders
338  */
339  bool decodeBangOlufsen();
340  bool decodeBoseWave();
341  bool decodeDenon();
342  bool decodeFAST();
343  bool decodeJVC();
344  bool decodeKaseikyo();
346  bool decodeLG();
347  bool decodeMagiQuest(); // not completely standard
348  bool decodeNEC();
349  bool decodeOpenLASIR();
350 #if defined(DECODE_RC5) || defined(DECODE_MARANTZ)
351  bool decodeRC5();
352 #endif
353 #if defined(DECODE_RC6)
354  bool decodeRC6();
355 #endif
356  bool decodeSamsung();
357  bool decodeSharp(); // redirected to decodeDenon()
358  bool decodeSony();
359  bool decodeWhynter();
360 
361  bool decodeDistanceWidth();
362 
363  bool decodeHash();
364 
365  // Template function :-)
366  bool decodeShuzu();
367 
368  /*
369  * Old functions
370  */
371  bool decodeDenonOld(decode_results *aResults);
372  bool decodeJVCMSB(decode_results *aResults);
373  bool decodeLGMSB(decode_results *aResults);
374  bool decodeNECMSB(decode_results *aResults);
376  bool decodeSonyMSB(decode_results *aResults);
377  bool decodeSAMSUNG(decode_results *aResults);
378  bool decodeHashOld(decode_results *aResults);
379 
380  bool decode_old(decode_results *aResults);
381 
382  bool decode(
383  decode_results *aResults)
384  __attribute__ ((deprecated ("Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> .")));
385 
386  // for backward compatibility. Now in IRFeedbackLED.hpp
387  void blink13(uint8_t aEnableLEDFeedback)
388  __attribute__ ((deprecated ("Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback().")));
389 
390  /*
391  * Internal functions
392  */
393  void initDecodedIRData();
394  uint_fast8_t compare(uint16_t oldval, uint16_t newval);
395  bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants);
396  bool checkHeader_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM);
397  void checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks);
398  bool checkForRecordGapsMicros(Print *aSerial);
399 
401  IRData decodedIRData; // Decoded IR data for the application
402 
403  // Last decoded IR data for repeat detection and to fill in JVC, LG, NEC repeat values. Parity for Denon autorepeat
407 #if defined(DECODE_DISTANCE_WIDTH)
408  IRDecodedRawDataType lastDecodedRawData;
409 #endif
410 
411  uint8_t repeatCount; // Used e.g. for Denon decode for autorepeat decoding.
412 };
413 
414 void printIRResultShort(Print *aSerial, IRData *aIRDataPtr, bool aPrintRepeatGap)
415  __attribute__ ((deprecated ("Remove last parameter, it is not supported any more.")));
416 void printIRResultShort(Print *aSerial, IRData *aIRDataPtr)
417  __attribute__ ((deprecated ("Use member function or printIRDataShort() instead.")));
418 ;
419 // A static function to be able to print send or copied received data.
420 void printIRDataShort(Print *aSerial, IRData *aIRDataPtr);
421 
422 /*
423  * Mark & Space matching functions
424  */
425 bool matchTicks(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros);
426 bool matchTicks(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros, int16_t aCompensationMicrosForTicks);
427 bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros);
428 bool matchSpace(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros);
429 
430 /*
431  * Old function names
432  */
433 bool MATCH(uint16_t measured, uint16_t desired);
434 bool MATCH_MARK(uint16_t measured_ticks, uint16_t desired_us);
435 bool MATCH_SPACE(uint16_t measured_ticks, uint16_t desired_us);
436 
437 int getMarkExcessMicros();
438 
439 void printActiveIRProtocols(Print *aSerial);
440 
441 /****************************************************
442  * Feedback LED related functions
443  ****************************************************/
444 #define DISABLE_LED_FEEDBACK false
445 #define ENABLE_LED_FEEDBACK true
446 //#define USE_DEFAULT_FEEDBACK_LED_PIN 0 // repeated definition for info
447 void setLEDFeedback(bool aEnableLEDFeedback); // Direct replacement for blink13()
448 void setLEDFeedbackPin(uint8_t aFeedbackLEDPin);
449 void setFeedbackLED(bool aSwitchLedOn);
450 void enableLEDFeedback();
451 constexpr auto enableLEDFeedbackForReceive = enableLEDFeedback; // alias for enableLEDFeedback
452 void disableLEDFeedback();
453 constexpr auto disableLEDFeedbackForReceive = disableLEDFeedback; // alias for enableLEDFeedback
456 
457 void setBlinkPin(uint8_t aFeedbackLEDPin) __attribute__ ((deprecated ("Please use setLEDFeedback()."))); // deprecated
458 
459 /*
460  * Pulse parms are ((X*50)-MARK_EXCESS_MICROS) for the Mark and ((X*50)+MARK_EXCESS_MICROS) for the Space.
461  * First MARK is the one after the long gap
462  * Pulse parameters in microseconds
463  */
464 #if !defined(TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING_PERCENT)
465 #define TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING_PERCENT 25 // Relative tolerance (in percent) for matchTicks(), matchMark() and matchSpace() functions used for protocol decoding.
466 #endif
467 
468 #define TICKS(us) ((us)/MICROS_PER_TICK) // (us)/50
469 #if MICROS_PER_TICK == 50 && TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING_PERCENT == 25 // Defaults
470 #define TICKS_LOW(us) ((us)/67 ) // =(us * 0.75 /MICROS_PER_TICK), 67 = MICROS_PER_TICK / ((100-25)/100) = (MICROS_PER_TICK * 100) / (100-25)
471 #define TICKS_HIGH(us) (((us)/40) + 1) // =(us * 1,25 /MICROS_PER_TICK), 40 = MICROS_PER_TICK / ((100+25)/100) = (MICROS_PER_TICK * 100) / (100+25)
472 #else
473 
474 //#define LTOL (1.0 - (TOLERANCE/100.))
475 #define LTOL (100 - TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING_PERCENT)
476 
477 //#define UTOL (1.0 + (TOLERANCE/100.))
478 #define UTOL (100 + TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING_PERCENT)
479 #define TICKS_LOW(us) ((uint16_t ) ((long) (us) * LTOL / (MICROS_PER_TICK * 100) ))
480 #define TICKS_HIGH(us) ((uint16_t ) ((long) (us) * UTOL / (MICROS_PER_TICK * 100) + 1))
481 #endif
482 
483 /*
484  * The receiver instance
485  */
486 extern IRrecv IrReceiver;
487 
488 /*
489  * The receiver interrupt handler for timer interrupt
490  */
492 
493 /****************************************************
494  * SENDING
495  ****************************************************/
496 
500 #define NO_REPEATS 0
501 #define SEND_REPEAT_COMMAND true
502 
503 
506 class IRsend {
507 public:
508  IRsend();
509 
510  /*
511  * IR_SEND_PIN is defined or fixed by timer, value of IR_SEND_PIN is then "DeterminedByTimer"
512  */
513 #if defined(IR_SEND_PIN)
514  void begin();
515  // The default parameter allowed to specify IrSender.begin(7); without errors, if IR_SEND_PIN was defined. But the semantics is not the one the user expect.
516  void begin(uint_fast8_t aFeedbackLEDPin);
517 #else
518  IRsend(uint_fast8_t aSendPin);
519  void begin(uint_fast8_t aSendPin);
520  void setSendPin(uint_fast8_t aSendPin); // required if we use IRsend() as constructor
521 #endif
522  void begin(uint_fast8_t aSendPin, uint_fast8_t aFeedbackLEDPin); // aFeedbackLEDPin is by default USE_DEFAULT_FEEDBACK_LED_PIN
523  void begin(uint_fast8_t aSendPin, bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin)
524 # if !defined (DOXYGEN)
525  __attribute__ ((deprecated ("Use begin(aSendPin, aFeedbackLEDPin) instead.")));
526 # endif
527 
528  size_t write(IRData *aIRSendData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
529  size_t write(decode_type_t aProtocol, uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats = NO_REPEATS);
530 
531  void enableIROut(uint_fast8_t aFrequencyKHz);
532 #if defined(SEND_PWM_BY_TIMER)
533  void enableHighFrequencyIROut(uint_fast16_t aFrequencyKHz); // Used for Bang&Olufsen
534 #endif
535 
536  /*
537  * Array functions
538  */
539  void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
540  uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
541  IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
542  int_fast8_t aNumberOfRepeats);
543  void sendPulseDistanceWidthFromPGMArray(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
544  uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
545  IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, uint8_t aFlags,
546  uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats);
548  IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats);
550  IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats);
552  IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats);
554  IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats);
555 
556  void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, DistanceWidthTimingInfoStruct *aDistanceWidthTimingInfo,
557  IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
558  int_fast8_t aNumberOfRepeats);
559  void sendPulseDistanceWidthFromArray_P(uint_fast8_t aFrequencyKHz,
560  DistanceWidthTimingInfoStruct const *aDistanceWidthTimingInfoPGM, IRDecodedRawDataType *aDecodedRawDataArray,
561  uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats);
562 
564  uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats);
566  uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats);
568  uint_fast8_t aNumberOfBits);
570  uint_fast8_t aNumberOfBits);
571  void sendPulseDistanceWidth(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
572  uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
573  IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
574  int_fast8_t aNumberOfRepeats, void (*aSpecialSendRepeatFunction)() = nullptr);
575  void sendPulseDistanceWidth(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
576  uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
577  IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, bool aMSBFirst, bool aSendStopBit, uint16_t aRepeatPeriodMillis,
578  int_fast8_t aNumberOfRepeats, void (*aSpecialSendRepeatFunction)() = nullptr)
579  __attribute__ ((deprecated ("Since version 4.1.0 parameter aSendStopBit is not longer required.")));
580  void sendPulseDistanceWidthData(uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros,
581  uint16_t aZeroSpaceMicros, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, uint8_t aFlags);
582  void sendBiphaseData(uint16_t aBiphaseTimeUnit, uint32_t aData, uint_fast8_t aNumberOfBits, bool aSendStartBit = true);
583 
584  void mark(uint16_t aMarkMicros);
585  static void space(uint16_t aSpaceMicros);
586  void IRLedOff();
587 
588 // 8 Bit array
589  void sendRaw(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
590  void sendRaw_P(const uint8_t aPGMBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
591  void sendRaw(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
592  uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats);
593  void sendRaw_P(const uint8_t aPGMBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
594  uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats);
595 
596 // 16 Bit array
597  void sendRaw(const uint16_t aBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
598  void sendRaw_P(const uint16_t aPGMBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz);
599  void sendRaw(const uint16_t aBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
600  uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats);
601  void sendRaw_P(const uint16_t aPGMBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
602  uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats);
603 
604  /*
605  * New send functions
606  */
607  void sendBangOlufsen(uint16_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats = NO_REPEATS,
608  int8_t aNumberOfHeaderBits = 8);
609  void sendBangOlufsenDataLink(uint32_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats = NO_REPEATS,
610  int8_t aNumberOfHeaderBits = 8);
611  void sendBangOlufsenRaw(uint32_t aRawData, int_fast8_t aBits, bool aBackToBack = false);
612  void sendBangOlufsenRawDataLink(uint64_t aRawData, int_fast8_t aBits, bool aBackToBack = false,
613  bool aUseDatalinkTiming = false);
614  void sendBoseWave(uint8_t aCommand, int_fast8_t aNumberOfRepeats = NO_REPEATS);
615  void sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aSendSharpFrameMarker = 0);
616  void sendDenonRaw(uint16_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS)
617  __attribute__ ((deprecated ("Please use sendDenon(aAddress, aCommand, aNumberOfRepeats).")));
618  void sendFAST(uint8_t aCommand, int_fast8_t aNumberOfRepeats);
619  void sendJVC(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
620 
621  void sendLG2Repeat();
622  uint32_t computeLGRawDataAndChecksum(uint8_t aAddress, uint16_t aCommand);
623  void sendLG(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
624  void sendLG2(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
625  void sendLGRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
626 
627  void sendNECRepeat();
628  uint32_t computeNECRawDataAndChecksum(uint16_t aAddress, uint16_t aCommand);
629  void sendNEC(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
630  void sendNEC2(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
631  void sendNECRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
632  // NEC variants
633  void sendOnkyo(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
634  void sendApple(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
635 
636  void sendOpenLASIRRepeat();
637  uint32_t computeOpenLASIRRawDataAndChecksum(uint8_t aAddress, uint16_t aCommand);
638  uint16_t computeOpenLASIRRawCommand(uint8_t aDeviceID, uint8_t aMode, uint8_t aData);
639  void sendOpenLASIR(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
640  void sendOpenLASIR(uint8_t aAddress, uint8_t aDeviceID, uint8_t aMode, uint8_t aData, int_fast8_t aNumberOfRepeats);
641  void sendOpenLASIRRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
642 #define OpenLASIR_GetMDeviceId(aCommand) (aCommand & 0xFF)
643 #define OpenLASIR_GetMode(aCommand) ((aCommand >> 8) & 0x1F)
644 #define OpenLASIR_GetData(aCommand) (aCommand >> 13)
645 
646  void sendKaseikyo(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats, uint16_t aVendorCode); // LSB first
647  void sendPanasonic(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
648  void sendKaseikyo_Denon(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
649  void sendKaseikyo_Mitsubishi(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
650  void sendKaseikyo_Sharp(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
651  void sendKaseikyo_JVC(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats); // LSB first
652 
653  void sendRC5(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle = true);
654  void sendRC5Marantz(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aMarantzExtension,
655  bool aEnableAutomaticToggle = true);
656  void sendRC6(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle = true);
657  void sendRC6A(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint16_t aCustomer,
658  bool aEnableAutomaticToggle = true);
659  void sendSamsungLGRepeat();
660  void sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
661  void sendSamsung16BitAddressAnd8BitCommand(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
662  void sendSamsung16BitAddressAndCommand(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
663  void sendSamsung48(uint16_t aAddress, uint32_t aCommand, int_fast8_t aNumberOfRepeats);
664  void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats);
665  void sendSharp(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats); // redirected to sendDenon
666  void sendSharp2(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats); // redirected to sendDenon
667  void sendSony(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t numberOfBits = 12); // SIRCS_12_PROTOCOL
668 
669  void sendLegoPowerFunctions(uint8_t aChannel, uint8_t tCommand, uint8_t aMode, bool aDoSend5Times = true);
670  void sendLegoPowerFunctions(uint16_t aRawData, bool aDoSend5Times = true);
671  void sendLegoPowerFunctions(uint16_t aRawData, uint8_t aChannel, bool aDoSend5Times = true);
672 
673  void sendMagiQuest(uint32_t aWandId, uint16_t aMagnitude);
674 
675  void sendPronto(const __FlashStringHelper *str, int_fast8_t aNumberOfRepeats = NO_REPEATS);
676  void sendPronto(const char *prontoHexString, int_fast8_t aNumberOfRepeats = NO_REPEATS);
677  void sendPronto(const uint16_t *data, uint16_t length, int_fast8_t aNumberOfRepeats = NO_REPEATS);
678 
679 #if defined(__AVR__)
680  void sendPronto_PF(uint_farptr_t str, int_fast8_t aNumberOfRepeats = NO_REPEATS);
681  void sendPronto_P(const char *str, int_fast8_t aNumberOfRepeats);
682 #endif
683 
684 // Template protocol :-)
685  void sendShuzu(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats);
686 
687  /*
688  * OLD send functions
689  */
690  void sendDenon(unsigned long data,
691  int nbits)
692  __attribute__ ((deprecated ("The function sendDenon(data, nbits) is deprecated and may not work as expected! Use sendDenonRaw(data, NumberOfRepeats) or better sendDenon(Address, Command, NumberOfRepeats).")));
693  void sendDish(uint16_t aData);
694  void sendJVC(unsigned long data, int nbits,
695  bool repeat)
696  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendJVC(aAddress, aCommand, aNumberOfRepeats)."))) {
697  sendJVCMSB(data, nbits, repeat);
698  }
699  void sendJVCMSB(unsigned long data, int nbits, bool repeat = false);
700 
701  void sendLG(unsigned long data,
702  int nbits)
703  __attribute__ ((deprecated ("The function sendLG(data, nbits) is deprecated and may not work as expected! Use sendLGRaw(data, NumberOfRepeats) or better sendLG(Address, Command, NumberOfRepeats).")));
704 
705  void sendNEC(uint32_t aRawData,
706  uint8_t nbits)
707  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendNECMSB() or sendNEC(aAddress, aCommand, aNumberOfRepeats)."))) {
708  sendNECMSB(aRawData, nbits);
709  }
710  void sendNECMSB(uint32_t data, uint8_t nbits, bool repeat = false);
711  void sendRC5(uint32_t data,
712  uint8_t nbits)
713  __attribute__ ((deprecated ("Please use sendRC5(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle) instead.")));
714  ;
715  void sendRC5ext(uint8_t addr, uint8_t cmd,
716  bool toggle)
717  __attribute__ ((deprecated ("Please use sendRC5(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle) instead.")));
718  ;
719  void sendRC6Raw(uint32_t data, uint8_t nbits);
720  void sendRC6(uint32_t data, uint8_t nbits) __attribute__ ((deprecated ("Please use sendRC6Raw().")));
721  void sendRC6Raw(uint64_t data, uint8_t nbits);
722  void sendRC6(uint64_t data, uint8_t nbits) __attribute__ ((deprecated ("Please use sendRC6Raw().")));
723 
724  void sendSharpRaw(unsigned long data, int nbits);
725  void sendSharp(uint16_t address, uint16_t command);
726  void sendSAMSUNG(unsigned long data, int nbits);
727  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendSamsung().")));
728  void sendSamsungMSB(unsigned long data, int nbits);
729  void sendSonyMSB(unsigned long data, int nbits);
730  void sendSony(unsigned long data,
731  int nbits)
732  __attribute__ ((deprecated ("This old function sends MSB first! Please use sendSony(aAddress, aCommand, aNumberOfRepeats).")));
733 
734  void sendWhynter(uint32_t aData, int_fast8_t aNumberOfRepeats);
735  void sendVelux(uint8_t aCommand, uint8_t aMotorNumber, uint8_t aMotorSet, uint16_t aSecurityCode, int_fast8_t aNumberOfRepeats);
736  void sendVelux(uint32_t aData, int_fast8_t aNumberOfRepeats);
737 
738 #if !defined(IR_SEND_PIN)
739  uint8_t sendPin;
740 #endif
742  uint16_t periodOnTimeMicros; // compensated with PULSE_CORRECTION_NANOS for duration of digitalWrite. Around 8 microseconds for 38 kHz.
743  uint16_t getPulseCorrectionNanos();
744 
745  static void customDelayMicroseconds(unsigned long aMicroseconds);
746 };
747 
748 /*
749  * The sender instance
750  */
751 extern IRsend IrSender;
752 
753 void sendNECSpecialRepeat();
755 void sendLG2SpecialRepeat();
757 
758 #endif // _IR_REMOTE_INT_H
IRData::address
uint16_t address
Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << ...
Definition: IRremoteInt.h:164
IRrecv::decodeHash
bool decodeHash()
Decodes an arbitrary IR code to a 32-bit value.
Definition: IRReceive.hpp:1160
IRsend::sendShuzu
void sendShuzu(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Template.hpp:136
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:265
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:193
decode_results::rawbuf
uint16_t * rawbuf
Definition: IRremoteInt.h:204
IRsend::sendApple
void sendApple(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Apple: Send NEC with fixed 16 bit Apple address 0x87EE.
Definition: ir_NEC.hpp:210
IRrecv::decodePulseDistanceWidthData
void decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
Definition: IRReceive.hpp:1076
IRsend::sendSamsungMSB
void sendSamsungMSB(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:399
setLEDFeedbackPin
void setLEDFeedbackPin(uint8_t aFeedbackLEDPin)
Definition: IRFeedbackLED.hpp:54
setFeedbackLED
void setFeedbackLED(bool aSwitchLedOn)
Flash LED while receiving or sending IR data.
Definition: IRFeedbackLED.hpp:96
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)
Sends NEC protocol.
Definition: ir_NEC.hpp:228
IRrecv::stop
void stop()
Disables the timer for IR reception.
Definition: IRReceive.hpp:463
IRrecv::lastDecodedProtocol
decode_type_t lastDecodedProtocol
Definition: IRremoteInt.h:404
IRData::numberOfBits
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
Definition: IRremoteInt.h:173
IRrecv::printDistanceWidthTimingInfo
void printDistanceWidthTimingInfo(Print *aSerial, DistanceWidthTimingInfoStruct *aDistanceWidthTimingInfo)
Definition: IRReceive.hpp:1822
IRsend::aNumberOfRepeats
void int_fast8_t aNumberOfRepeats
Definition: IRremoteInt.h:528
IRsend::sendPin
uint8_t sendPin
Definition: IRremoteInt.h:739
IRsend::sendJVC
void sendJVC(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
The JVC protocol repeats by skipping the header mark and space -> this leads to a poor repeat detecti...
Definition: ir_JVC.hpp:89
IRrecv::disableIRIn
void disableIRIn()
Alias for stop().
Definition: IRReceive.hpp:477
IRsend::sendBangOlufsenRaw
void sendBangOlufsenRaw(uint32_t aRawData, int_fast8_t aBits, bool aBackToBack=false)
Definition: ir_BangOlufsen.hpp:157
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:183
setBlinkPin
void setBlinkPin(uint8_t aFeedbackLEDPin) __attribute__((deprecated("Please use setLEDFeedback().")))
Old deprecated function name for setLEDFeedback()
Definition: IRFeedbackLED.hpp:161
IRrecv::decodePulseDistanceWidthData_P
void decodePulseDistanceWidthData_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
Definition: IRReceive.hpp:1112
IRRawlenType
unsigned int IRRawlenType
Definition: IRremoteInt.h:88
IRrecv::checkHeader_P
bool checkHeader_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM)
Definition: IRReceive.hpp:1228
IRrecv::enableIRIn
void enableIRIn()
Alias for start().
Definition: IRReceive.hpp:413
enableLEDFeedback
void enableLEDFeedback()
Definition: IRFeedbackLED.hpp:81
IRsend::setSendPin
void setSendPin(uint_fast8_t aSendPin)
Definition: IRSend.hpp:104
IRsend::sendPulseDistanceWidthFromArray
void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:739
IRrecv::checkForRecordGapsMicros
bool checkForRecordGapsMicros(Print *aSerial)
Checks if protocol is not detected and detected space between two transmissions is smaller than known...
Definition: IRReceive.hpp:1429
IRsend::sendBoseWave
void sendBoseWave(uint8_t aCommand, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Definition: ir_BoseWave.hpp:55
IRsend::sendSony
void sendSony(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t numberOfBits=12)
Definition: ir_Sony.hpp:101
IRrecv::compensateAndStorePronto
size_t compensateAndStorePronto(String *aString, uint16_t frequency=38000U)
Definition: ir_Pronto.hpp:325
IRrecv::registerReceiveCompleteCallback
void registerReceiveCompleteCallback(void(*aReceiveCompleteCallbackFunction)(void))
Sets the function to call if a complete protocol frame has arrived.
Definition: IRReceive.hpp:369
IRsend::sendSharp2
void sendSharp2(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Denon.hpp:119
IRrecv
Definition: IRremoteInt.h:213
NO_REPEATS
#define NO_REPEATS
Just for better readability of code.
Definition: IRremoteInt.h:500
IRsend::sendRC6Raw
void sendRC6Raw(uint32_t data, uint8_t nbits)
Definition: ir_RC5_RC6.hpp:525
IRsend::mark
void mark(uint16_t aMarkMicros)
Sends an IR mark for the specified number of microseconds.
Definition: IRSend.hpp:1247
IRrecv::decodeDistanceWidth
bool decodeDistanceWidth()
Definition: ir_DistanceWidthProtocol.hpp:206
IRsend::sendSamsungLGRepeat
void sendSamsungLGRepeat()
Send repeat Repeat commands should be sent in a 110 ms raster.
Definition: ir_Samsung.hpp:118
IRsend::sendPulseDistanceWidth
void sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Sends PulseDistance frames and repeats.
Definition: IRSend.hpp:917
disableLEDFeedbackForReceive
constexpr auto disableLEDFeedbackForReceive
Definition: IRremoteInt.h:453
IRsend::sendSamsung48
void sendSamsung48(uint16_t aAddress, uint32_t aCommand, int_fast8_t aNumberOfRepeats)
Here we send Samsung48 We send 2 x (8 bit command and then ~command)
Definition: ir_Samsung.hpp:234
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:591
decode_results::overflow
bool overflow
Definition: IRremoteInt.h:206
decode_type_t
decode_type_t
An enum consisting of all supported formats.
Definition: IRProtocol.h:97
IRrecv::printIRResultRawFormatted
void printIRResultRawFormatted(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
Dump out the timings in IrReceiver.irparams.rawbuf[] array 8 values per line.
Definition: IRReceive.hpp:2128
IRrecv::more
bool it is not supported any more
Definition: IRremoteInt.h:279
IRrecv::restartAfterSend
void restartAfterSend()
Restarts receiver after send.
Definition: IRReceive.hpp:454
IRsend::sendRaw_P
void sendRaw_P(const uint8_t aPGMBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz)
New function using an 8 byte tick (50 us) timing array in FLASH to save program memory Raw data start...
Definition: IRSend.hpp:556
IRrecv::decodeBangOlufsen
bool decodeBangOlufsen()
Definition: ir_BangOlufsen.hpp:284
IRsend::sendOpenLASIRRaw
void sendOpenLASIRRaw(uint32_t aRawData, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Send raw 32-bit OpenLASIR data.
Definition: ir_OpenLASIR.hpp:213
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:1466
IRrecv::IRrecv
IRrecv()
Instantiate the IRrecv class.
Definition: IRReceive.hpp:63
IRsend::IRsend
IRsend()
Definition: IRSend.hpp:64
IRrecv::decodeSharp
bool decodeSharp()
Definition: ir_Denon.hpp:163
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:155
IRsend::sendMagiQuest
void sendMagiQuest(uint32_t aWandId, uint16_t aMagnitude)
Definition: ir_MagiQuest.hpp:124
IRrecv::printIRResultShort
bool printIRResultShort(Print *aSerial, bool aPrintRepeatGap, bool aCheckForRecordGapsMicros) __attribute__((deprecated("Remove second parameter
Function to print values and flags of IrReceiver.decodedIRData in one line.
Definition: IRReceive.hpp:1541
IRsend::__attribute__
__attribute__((deprecated("This old function sends MSB first! Please use sendSamsung().")))
IRsend::computeOpenLASIRRawDataAndChecksum
uint32_t computeOpenLASIRRawDataAndChecksum(uint8_t aAddress, uint16_t aCommand)
Compute the raw 32-bit data for an OpenLASIR frame from 8-bit address and 16-bit command.
Definition: ir_OpenLASIR.hpp:148
decode_results::bits
uint8_t bits
Definition: IRremoteInt.h:199
decode_results::decode_type
decode_type_t decode_type
Definition: IRremoteInt.h:196
matchTicks
bool matchTicks(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Match function WITHOUT compensating for marks exceeded or spaces shortened by demodulator hardware Ma...
Definition: IRReceive.hpp:1264
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:135
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:311
IRrecv::checkForRepeatSpaceTicksAndSetFlag
void checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks)
Definition: IRReceive.hpp:1248
IRrecv::decodeSonyMSB
bool decodeSonyMSB(decode_results *aResults)
Definition: ir_Sony.hpp:145
IRsend
Main class for sending IR signals.
Definition: IRremoteInt.h:506
IRrecv::decodeSony
bool decodeSony()
Definition: ir_Sony.hpp:107
irparams_struct
This struct contains the data and control used for receiver functions and the ISR (interrupt service ...
Definition: IRremoteInt.h:125
matchSpace
bool matchSpace(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for spaces shortened by demodulator hardware.
Definition: IRReceive.hpp:1375
IRrecv::compensateAndPrintIRResultAsPronto
void compensateAndPrintIRResultAsPronto(Print *aSerial, uint16_t frequency=38000U)
Print the result (second argument) as Pronto Hex on the Print supplied as argument.
Definition: ir_Pronto.hpp:257
sendLG2SpecialRepeat
void sendLG2SpecialRepeat()
Static function for sending special repeat frame.
Definition: ir_LG.hpp:136
IRrecv::read
IRData * read()
Returns pointer to IrReceiver.decodedIRData if IR receiver data is available, else nullptr.
Definition: IRReceive.hpp:543
IRrecv::decodeLGMSB
bool decodeLGMSB(decode_results *aResults)
Definition: ir_LG.hpp:269
IRsend::computeOpenLASIRRawCommand
uint16_t computeOpenLASIRRawCommand(uint8_t aDeviceID, uint8_t aMode, uint8_t aData)
Compute the raw 32-bit data for an OpenLASIR frame from 8-bit address, 8-bit DeviceID,...
Definition: ir_OpenLASIR.hpp:170
IRsend::sendDenon
void sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aSendSharpFrameMarker=0)
Definition: ir_Denon.hpp:129
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 If we get an ad...
Definition: ir_Samsung.hpp:172
enableLEDFeedbackForSend
void enableLEDFeedbackForSend()
decode_results::value
uint32_t value
Definition: IRremoteInt.h:198
sMicrosAtLastStopTimer
unsigned long sMicrosAtLastStopTimer
Definition: IRReceive.hpp:49
DistanceWidthTimingInfoStruct
Definition: IRProtocol.h:112
MATCH_SPACE
bool MATCH_SPACE(uint16_t measured_ticks, uint16_t desired_us)
Definition: IRReceive.hpp:1413
IRrecv::decodeSAMSUNG
bool decodeSAMSUNG(decode_results *aResults)
Definition: ir_Samsung.hpp:361
IRDecodedRawDataType
uint32_t IRDecodedRawDataType
Definition: IRremoteInt.h:151
IRrecv::decodeLegoPowerFunctions
bool decodeLegoPowerFunctions()
Definition: ir_Lego.hpp:144
IRsend::instead
void uint8_t int_fast8_t bool aEnableAutomaticToggle instead
Definition: IRremoteInt.h:713
irparams_struct::OverflowFlag
bool OverflowFlag
Raw buffer OverflowFlag occurred.
Definition: IRremoteInt.h:144
IRsend::sendRaw
void sendRaw(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz)
Sends an 8 byte tick timing array to save program memory.
Definition: IRSend.hpp:453
IRrecv::decodeFAST
bool decodeFAST()
Definition: ir_FAST.hpp:96
PulseDistanceWidthProtocolConstants
Definition: IRProtocol.h:139
IRsend::sendPulseDistanceWidth_P
void sendPulseDistanceWidth_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:1158
DECODED_RAW_DATA_ARRAY_SIZE
#define DECODED_RAW_DATA_ARRAY_SIZE
Definition: IRremoteInt.h:157
IRrecv::decodePanasonicMSB
bool decodePanasonicMSB(decode_results *aResults)
IRrecv::getProtocolString
const char * getProtocolString()
Definition: IRReceive.hpp:2348
irparams_struct::rawlen
IRRawlenType rawlen
counter of entries in rawbuf
Definition: IRremoteInt.h:145
IRrecv::decodedIRData
IRData decodedIRData
Definition: IRremoteInt.h:401
IRData
Data structure for the user application, available as decodedIRData.
Definition: IRremoteInt.h:162
IRsend::sendLG2Repeat
void sendLG2Repeat()
Definition: ir_LG.hpp:125
printIRResultShort
void printIRResultShort(Print *aSerial, IRData *aIRDataPtr, bool aPrintRepeatGap) __attribute__((deprecated("Remove last parameter
IRsend::sendSamsung16BitAddressAndCommand
void sendSamsung16BitAddressAndCommand(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Maybe no one needs it in the wild...
Definition: ir_Samsung.hpp:220
IRsend::sendRC5ext
void sendRC5ext(uint8_t addr, uint8_t cmd, bool toggle) __attribute__((deprecated("Please use sendRC5(uint8_t aAddress
Definition: ir_RC5_RC6.hpp:834
IRrecv::compensateAndPrintIRResultAsCArray
void compensateAndPrintIRResultAsCArray(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
Dump out the IrReceiver.irparams.rawbuf[] to be used as C definition for sendRaw().
Definition: IRReceive.hpp:2227
IRrecv::decodeSamsung
bool decodeSamsung()
Definition: ir_Samsung.hpp:270
IRData::flags
uint8_t flags
IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above.
Definition: IRremoteInt.h:174
IRsend::sendSamsungLG
void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Samsung.hpp:146
disableLEDFeedbackForSend
void disableLEDFeedbackForSend()
IRrecv::printIRResultMinimal
void printIRResultMinimal(Print *aSerial)
Function to print protocol number, address, command, raw data and repeat flag of IrReceiver....
Definition: IRReceive.hpp:2065
sendSamsungLGSpecialRepeat
void sendSamsungLGSpecialRepeat()
Like above, but implemented as a static function Used for sending special repeat frame.
Definition: ir_Samsung.hpp:132
disableLEDFeedback
void disableLEDFeedback()
Definition: IRFeedbackLED.hpp:84
IRsend::sendPulseDistanceWidthFromPGMArray
void sendPulseDistanceWidthFromPGMArray(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:804
IRrecv::instance
and not your own IRrecv instance
Definition: IRremoteInt.h:223
MATCH
bool MATCH(uint16_t measured, uint16_t desired)
Definition: IRReceive.hpp:1319
IRsend::sendSharp
void sendSharp(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Denon.hpp:114
IRrecv::checkHeader
bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants)
Definition: IRReceive.hpp:1213
IRsend::sendKaseikyo
void sendKaseikyo(uint16_t aAddress, uint8_t aData, int_fast8_t aNumberOfRepeats, uint16_t aVendorCode)
Address can be interpreted as sub-device << 4 + 4 bit device.
Definition: ir_Kaseikyo.hpp:130
IRrecv::compare
uint_fast8_t compare(uint16_t oldval, uint16_t newval)
Compare two (tick) values for Hash decoder Use a tolerance of 20% to enable e.g.
Definition: IRReceive.hpp:1133
IRsend::begin
void begin(uint_fast8_t aSendPin)
Initializes the send pin and enable LED feedback with board specific LED_BUILTIN pin if it is defined...
Definition: IRSend.hpp:100
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:394
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:190
IRrecv::printActiveIRProtocols
static void printActiveIRProtocols(Print *aSerial)
Definition: IRReceive.hpp:1454
printActiveIRProtocols
void printActiveIRProtocols(Print *aSerial)
Definition: IRReceive.hpp:1462
IRsend::sendNEC
void sendNEC(uint16_t aAddress, uint16_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:180
IRsend::NumberOfRepeats
void nbits is deprecated and may not work as expected ! Use NumberOfRepeats
Definition: IRremoteInt.h:692
IRsend::computeLGRawDataAndChecksum
uint32_t computeLGRawDataAndChecksum(uint8_t aAddress, uint16_t aCommand)
Definition: ir_LG.hpp:143
IRsend::periodOnTimeMicros
uint16_t periodOnTimeMicros
Definition: IRremoteInt.h:742
IRData::command
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
Definition: IRremoteInt.h:165
IRsend::sendFAST
void sendFAST(uint8_t aCommand, int_fast8_t aNumberOfRepeats)
The FAST protocol repeats by skipping the header mark and space -> this leads to a poor repeat detect...
Definition: ir_FAST.hpp:75
IRsend::sendOpenLASIRRepeat
void sendOpenLASIRRepeat()
Send special OpenLASIR repeat frame (same as NEC repeat frame).
Definition: ir_OpenLASIR.hpp:127
IRData::decodedRawData
IRDecodedRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send<protocol>Raw functions.
Definition: IRremoteInt.h:167
IRrecv::printIRDuration
void printIRDuration(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks)
Definition: IRReceive.hpp:2106
IRReceiveTimerInterruptHandler
void IRReceiveTimerInterruptHandler()
Definition: IRReceive.hpp:277
IRrecv::getMaximumTicksFromRawData
uint8_t getMaximumTicksFromRawData(bool aSearchSpaceInsteadOfMark)
Definition: IRReceive.hpp:1864
IRsend::sendRC5Marantz
void sendRC5Marantz(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aMarantzExtension, bool aEnableAutomaticToggle=true)
!!! Not tested, because no Marantz remote was at hand and no receive function was contributed!...
Definition: ir_RC5_RC6.hpp:130
IRrecv::restartTimer
void restartTimer()
Definition: IRReceive.hpp:397
IRrecv::restartTimerWithTicksToAdd
void restartTimerWithTicksToAdd(uint16_t aTicksToAddToGapCounter)
Configures the timer and the state machine for IR reception.
Definition: IRReceive.hpp:439
IRrecv::isIdle
bool isIdle()
Definition: IRReceive.hpp:529
IRsend::sendBiphaseData
void sendBiphaseData(uint16_t aBiphaseTimeUnit, uint32_t aData, uint_fast8_t aNumberOfBits, bool aSendStartBit=true)
Sends Biphase (Manchester) coded data MSB first This function concatenates two marks to one longer ma...
Definition: IRSend.hpp:1178
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:162
IRsend::sendPulseDistanceWidthData_P
void sendPulseDistanceWidthData_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits)
Definition: IRSend.hpp:670
more
void it is not supported any more
Definition: IRremoteInt.h:415
getMarkExcessMicros
int getMarkExcessMicros()
Getter function for MARK_EXCESS_MICROS.
Definition: IRReceive.hpp:1420
matchMark
bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
Definition: IRReceive.hpp:1327
IRsend::sendBangOlufsen
void sendBangOlufsen(uint16_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats=NO_REPEATS, int8_t aNumberOfHeaderBits=8)
Definition: ir_BangOlufsen.hpp:140
MATCH_MARK
bool MATCH_MARK(uint16_t measured_ticks, uint16_t desired_us)
Definition: IRReceive.hpp:1367
IRsend::getPulseCorrectionNanos
uint16_t getPulseCorrectionNanos()
Definition: IRSend.hpp:1555
irparams_struct::TickCounterForISR
volatile uint_fast16_t TickCounterForISR
Counts 50uS ticks. The value is copied into the rawbuf array on every transition. Counting is indepen...
Definition: IRremoteInt.h:133
irparams_struct::StateForISR
volatile uint8_t StateForISR
State Machine state.
Definition: IRremoteInt.h:127
IRrecv::setReceivePin
void setReceivePin(uint_fast8_t aReceivePinNumber)
Sets / changes the receiver pin number.
Definition: IRReceive.hpp:331
irparams_struct::rawbuf
IRRawbufType rawbuf[RAW_BUFFER_LENGTH]
raw data / tick counts per mark/space. With 8 bit we can only store up to 12.7 ms....
Definition: IRremoteInt.h:147
IRrecv::decodeDenonOld
bool decodeDenonOld(decode_results *aResults)
Definition: ir_Denon.hpp:285
IRrecv::start
void start()
Start the receiving process.
Definition: IRReceive.hpp:379
IRsend::sendPulseDistanceWidthFromArray_P
void sendPulseDistanceWidthFromArray_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:1139
IRsend::computeNECRawDataAndChecksum
uint32_t computeNECRawDataAndChecksum(uint16_t aAddress, uint16_t aCommand)
Convert 16 bit address and 16 bit command to 32 bit NECRaw data If we get a command < 0x100,...
Definition: ir_NEC.hpp:157
IRrecv::initDecodedIRData
void initDecodedIRData()
Is internally called by decode before calling decoders.
Definition: IRReceive.hpp:502
IRrecv::irparams
irparams_struct irparams
Definition: IRremoteInt.h:400
IRsend::sendPronto
void sendPronto(const __FlashStringHelper *str, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Definition: ir_Pronto.hpp:191
IRrecv::lastDecodedCommand
uint16_t lastDecodedCommand
Definition: IRremoteInt.h:406
decode_results::address
uint16_t address
Definition: IRremoteInt.h:197
IrSender
IRsend IrSender
Definition: IRSend.hpp:62
IRsend::sendSamsung16BitAddressAnd8BitCommand
void sendSamsung16BitAddressAnd8BitCommand(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Maybe no one needs it in the wild...
Definition: ir_Samsung.hpp:203
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:227
IRsend::sendPulseDistanceWidth
void sendPulseDistanceWidth(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, bool aMSBFirst, bool aSendStopBit, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats, void(*aSpecialSendRepeatFunction)()=nullptr) __attribute__((deprecated("Since version 4.1.0 parameter aSendStopBit is not longer required.")))
IRrecv::getMaximumMarkTicksFromRawData
uint8_t getMaximumMarkTicksFromRawData()
Definition: IRReceive.hpp:1840
IRrecv::decodeBoseWave
bool decodeBoseWave()
Definition: ir_BoseWave.hpp:62
IRsend::sendSonyMSB
void sendSonyMSB(unsigned long data, int nbits)
Old version with MSB first data.
Definition: ir_Sony.hpp:206
setLEDFeedback
void setLEDFeedback(bool aEnableLEDFeedback)
Definition: IRFeedbackLED.hpp:74
IRrecv::available
bool available()
Returns true if IR receiver has received a complete IR frame (detected by timeout after last mark).
Definition: IRReceive.hpp:536
IRData::extra
uint16_t extra
Contains upper 16 bit of Magiquest WandID, Kaseikyo unknown vendor ID and Distance protocol (HeaderMa...
Definition: IRremoteInt.h:166
IRrecv::printIRResultAsCVariables
void printIRResultAsCVariables(Print *aSerial)
Print results as C variables to be used for sendXXX() uint16_t address = 0x44; uint16_t command = 0x1...
Definition: IRReceive.hpp:2310
IRsend::periodTimeMicros
uint16_t periodTimeMicros
Definition: IRremoteInt.h:741
IRrecv::getMaximumSpaceTicksFromRawData
uint8_t getMaximumSpaceTicksFromRawData()
Definition: IRReceive.hpp:1850
IRsend::sendPulseDistanceWidthFromPGMArray_P
void sendPulseDistanceWidthFromPGMArray_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:1148
IRsend::space
static void space(uint16_t aSpaceMicros)
Sends an IR space for the specified number of microseconds.
Definition: IRSend.hpp:1458
IRrecv::decode_old
bool decode_old(decode_results *aResults)
Definition: IRReceive.hpp:2361
IRsend::sendRC5
void sendRC5(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, bool aEnableAutomaticToggle=true)
Definition: ir_RC5_RC6.hpp:189
enableLEDFeedbackForReceive
constexpr auto enableLEDFeedbackForReceive
Definition: IRremoteInt.h:451
IRrecv::decodeStrictPulseDistanceWidthData
bool decodeStrictPulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst)
Definition: IRReceive.hpp:961
decode_results::magnitude
uint16_t magnitude
Definition: IRremoteInt.h:200
sendOpenLASIRSpecialRepeat
void sendOpenLASIRSpecialRepeat()
Static function variant of IRsend::sendOpenLASIRRepeat For use in ProtocolConstants.
Definition: ir_OpenLASIR.hpp:135
IRsend::sendBangOlufsenRawDataLink
void sendBangOlufsenRawDataLink(uint64_t aRawData, int_fast8_t aBits, bool aBackToBack=false, bool aUseDatalinkTiming=false)
Definition: ir_BangOlufsen.hpp:221
IRsend::sendNEC2
void sendNEC2(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
NEC2 Send frame !!! and repeat the frame for each requested repeat !!! There is NO delay after the la...
Definition: ir_NEC.hpp:198
IRrecv::end
void end()
Alias for stop().
Definition: IRReceive.hpp:483
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:176
IRData::rawlen
IRRawlenType rawlen
Counter of entries in rawbuf of last received frame.
Definition: IRremoteInt.h:182
IRrecv::decodeNECMSB
bool decodeNECMSB(decode_results *aResults)
Definition: ir_NEC.hpp:332
IRrecv::decodeNEC
bool decodeNEC()
Decodes also Onkyo and Apple.
Definition: ir_NEC.hpp:235
IRrecv::decodeHashOld
bool decodeHashOld(decode_results *aResults)
Definition: IRReceive.hpp:1184
IRrecv::printIRSendUsage
void printIRSendUsage(Print *aSerial)
Function to print values and flags of IrReceiver.decodedIRData in one line.
Definition: IRReceive.hpp:1904
IRrecv::decodeOpenLASIR
bool decodeOpenLASIR()
Decode an OpenLASIR frame.
Definition: ir_OpenLASIR.hpp:229
IRsend::sendNECRepeat
void sendNECRepeat()
Send special NEC repeat frame Repeat commands should be sent in a 110 ms raster.
Definition: ir_NEC.hpp:132
IRsend::sendPulseDistanceWidthData
void sendPulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits)
Sends PulseDistance from data contained in parameter using ProtocolConstants structure for timing etc...
Definition: IRSend.hpp:662
IRRawbufType
uint8_t IRRawbufType
Definition: IRremoteInt.h:107
IRsend::sendSAMSUNG
void sendSAMSUNG(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:411
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:1416
IRrecv::decodeMagiQuest
bool decodeMagiQuest()
Definition: ir_MagiQuest.hpp:156
IRsend::sendWhynter
void sendWhynter(uint32_t aData, int_fast8_t aNumberOfRepeats)
Definition: ir_Others.hpp:90
IRrecv::getTotalDurationOfRawData
uint32_t getTotalDurationOfRawData()
Definition: IRReceive.hpp:1881
IRrecv::decodeDenon
bool decodeDenon()
Definition: ir_Denon.hpp:167
IRrecv::decodeLG
bool decodeLG()
Definition: ir_LG.hpp:172
IRrecv::stopTimer
void stopTimer()
Definition: IRReceive.hpp:470
IRrecv::decode
bool decode()
The main decode function, attempts to decode the recently receive IR signal.
Definition: IRReceive.hpp:560
IRrecv::decodeJVC
bool decodeJVC()
Definition: ir_JVC.hpp:116
IRsend::sendSharpRaw
void sendSharpRaw(unsigned long data, int nbits)
IRsend::sendRC6A
void sendRC6A(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint16_t aCustomer, 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:633
RAW_BUFFER_LENGTH
#define RAW_BUFFER_LENGTH
The RAW_BUFFER_LENGTH determines the length of the byte buffer where the received IR timing data is s...
Definition: IRremoteInt.h:78
IRsend::sendOnkyo
void sendOnkyo(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
There is NO delay after the last sent repeat!
Definition: ir_NEC.hpp:189
IRrecv::decodeKaseikyo
bool decodeKaseikyo()
Definition: ir_Kaseikyo.hpp:197
IRsend::Command
void nbits is deprecated and may not work as expected ! Use Command
Definition: IRremoteInt.h:692
IRsend::sendLegoPowerFunctions
void sendLegoPowerFunctions(uint8_t aChannel, uint8_t tCommand, uint8_t aMode, bool aDoSend5Times=true)
Definition: ir_Lego.hpp:113
IRsend::write
size_t write(decode_type_t aProtocol, uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats=NO_REPEATS)
Interprets and sends a IRData structure.
Definition: IRSend.hpp:146
IRrecv::ReceiveInterruptHandler
void ReceiveInterruptHandler()
Definition: IRReceive.hpp:109
USE_DEFAULT_FEEDBACK_LED_PIN
#define USE_DEFAULT_FEEDBACK_LED_PIN
Main class for receiving IR signals.
Definition: IRremoteInt.h:212
decode_results::rawlen
uint_fast8_t rawlen
Definition: IRremoteInt.h:205
IRsend::sendDenonRaw
void sendDenonRaw(uint16_t aRawData, int_fast8_t aNumberOfRepeats=NO_REPEATS) __attribute__((deprecated("Please use sendDenon(aAddress
Definition: ir_Denon.hpp:254
IRData::protocol
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
Definition: IRremoteInt.h:163
IRsend::sendOpenLASIR
void sendOpenLASIR(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Send an OpenLASIR frame with special NEC-style repeats.
Definition: ir_OpenLASIR.hpp:187
IRsend::sendLG
void sendLG(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
LG uses the NEC repeat.
Definition: ir_LG.hpp:161
printIRDataShort
void printIRDataShort(Print *aSerial, IRData *aIRDataPtr)
Definition: IRReceive.hpp:1664
IRrecv::resume
void resume()
Restart the ISR (Interrupt Service Routine) state machine, to enable receiving of the next IR frame.
Definition: IRReceive.hpp:491
IRsend::sendBangOlufsenDataLink
void sendBangOlufsenDataLink(uint32_t aHeader, uint8_t aData, int_fast8_t aNumberOfRepeats=NO_REPEATS, int8_t aNumberOfHeaderBits=8)
Definition: ir_BangOlufsen.hpp:147
IRrecv::decodeShuzu
bool decodeShuzu()
Definition: ir_Template.hpp:141
IRrecv::lastDecodedAddress
uint16_t lastDecodedAddress
Definition: IRremoteInt.h:405
IRsend::aCommand
void aCommand
Definition: IRremoteInt.h:617
IRrecv::compensateAndStoreIRResultInArray
void compensateAndStoreIRResultInArray(uint8_t *aArrayPtr)
Store the decodedIRData to be used for sendRaw().
Definition: IRReceive.hpp:2284
IrReceiver
IRrecv IrReceiver
The receiver instance.
Definition: IRReceive.hpp:57
IRData::initialGapTicks
uint16_t initialGapTicks
Contains the initial gap (pre 4.4: the value in rawbuf[0]) of the last received frame.
Definition: IRremoteInt.h:183
IRsend::enableIROut
void enableIROut(uint_fast8_t aFrequencyKHz)
Enables IR output.
Definition: IRSend.hpp:1498
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:169
IRsend::sendLG2
void sendLG2(uint8_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
LG2 uses a special repeat.
Definition: ir_LG.hpp:168
IRrecv::decodeWithThresholdPulseDistanceWidthData
void decodeWithThresholdPulseDistanceWidthData(uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneThresholdMicros, bool aIsPulseWidthProtocol, bool aMSBfirst)
New threshold decoder to be activated by USE_THRESHOLD_DECODER Assumes a 0 for shorter and a 1 for lo...
Definition: IRReceive.hpp:833
decode_results::isRepeat
bool isRepeat
Definition: IRremoteInt.h:201
IRrecv::printIRResultAsCArray
void printIRResultAsCArray(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true, bool aDoCompensate=true)
Definition: IRReceive.hpp:2230
IRsend::sendVelux
void sendVelux(uint8_t aCommand, uint8_t aMotorNumber, uint8_t aMotorSet, uint16_t aSecurityCode, int_fast8_t aNumberOfRepeats)
Definition: ir_Others.hpp:181
IRrecv::decodeJVCMSB
bool decodeJVCMSB(decode_results *aResults)
Definition: ir_JVC.hpp:166
sendNECSpecialRepeat
void sendNECSpecialRepeat()
Static function variant of IRsend::sendNECRepeat For use in ProtocolConstants.
Definition: ir_NEC.hpp:143
IRrecv::decodeWhynter
bool decodeWhynter()
Definition: ir_Others.hpp:94
IRrecv::repeatCount
uint8_t repeatCount
Definition: IRremoteInt.h:411
irparams_struct::IRReceivePin
uint_fast8_t IRReceivePin
Pin connected to IR data from detector.
Definition: IRremoteInt.h:128
irparams_struct::initialGapTicks
uint16_t initialGapTicks
Tick counts of the length of the gap between previous and current IR frame. Pre 4....
Definition: IRremoteInt.h:146