IRremote
IRrecv Class Reference

#include <IRremoteInt.h>

Collaboration diagram for IRrecv:

Public Member Functions

 IRrecv ()
 Instantiate the IRrecv class. More...
 
 IRrecv (uint_fast8_t aReceivePin) __attribute__((deprecated("Please use the default IRrecv instance \"IrReceiver\" and IrReceiver.begin()
 
 IRrecv (uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin) __attribute__((deprecated("Please use the default IRrecv instance \"IrReceiver\" and IrReceiver.begin()
 Instantiate the IRrecv class. More...
 
void setReceivePin (uint_fast8_t aReceivePinNumber)
 Sets / changes the receiver pin number. More...
 
void registerReceiveCompleteCallback (void(*aReceiveCompleteCallbackFunction)(void))
 Sets the function to call if a complete protocol frame has arrived. More...
 
void ReceiveInterruptHandler ()
 
void begin (uint_fast8_t aReceivePin, bool aEnableLEDFeedback=false, uint_fast8_t aFeedbackLEDPin=USE_DEFAULT_FEEDBACK_LED_PIN)
 Initializes the receive and feedback pin. More...
 
void start ()
 Start the receiving process. More...
 
void enableIRIn ()
 Alias for start(). More...
 
void restartTimer ()
 
void restartTimer (uint32_t aMicrosecondsToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void restartTimerWithTicksToAdd (uint16_t aTicksToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void restartAfterSend ()
 Restarts receiver after send. More...
 
bool available ()
 Returns true if IR receiver data is available. More...
 
IRDataread ()
 Returns pointer to IrReceiver.decodedIRData if IR receiver data is available, else nullptr. More...
 
void stopTimer ()
 
void stop ()
 Disables the timer for IR reception. More...
 
void disableIRIn ()
 Alias for stop(). More...
 
void end ()
 Alias for stop(). More...
 
bool isIdle ()
 Returns status of reception. More...
 
bool decode ()
 The main decode function, attempts to decode the recently receive IR signal. More...
 
void resume ()
 Restart the ISR (Interrupt Service Routine) state machine, to enable receiving of the next IR frame. More...
 
void printIRResultMinimal (Print *aSerial)
 Function to print protocol number, address, command, raw data and repeat flag of IrReceiver.decodedIRData in one short line. More...
 
void printIRDuration (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks)
 
void printIRResultRawFormatted (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the timings in IrReceiver.irparams.rawbuf[] array 8 values per line. More...
 
void printIRResultAsCVariables (Print *aSerial)
 Print results as C variables to be used for sendXXX() uint16_t address = 0x44; uint16_t command = 0x11; uint32_t rawData = 0x44BB11EE;. More...
 
uint8_t getMaximumMarkTicksFromRawData ()
 
uint8_t getMaximumSpaceTicksFromRawData ()
 
uint8_t getMaximumTicksFromRawData (bool aSearchSpaceInsteadOfMark)
 
uint32_t getTotalDurationOfRawData ()
 
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. More...
 
bool printIRResultShort (Print *aSerial, bool aCheckForRecordGapsMicros=true)
 
void printDistanceWidthTimingInfo (Print *aSerial, DistanceWidthTimingInfoStruct *aDistanceWidthTimingInfo)
 
void printIRSendUsage (Print *aSerial)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
const char * getProtocolString ()
 
void printIRResultAsCArray (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true, bool aDoCompensate=true)
 
void compensateAndPrintIRResultAsCArray (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the IrReceiver.irparams.rawbuf[] to be used as C definition for sendRaw(). More...
 
void compensateAndPrintIRResultAsPronto (Print *aSerial, uint16_t frequency=38000U)
 Print the result (second argument) as Pronto Hex on the Print supplied as argument. More...
 
void compensateAndStoreIRResultInArray (uint8_t *aArrayPtr)
 Store the decodedIRData to be used for sendRaw(). More...
 
size_t compensateAndStorePronto (String *aString, uint16_t frequency=38000U)
 
void decodePulseDistanceWidthData (PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
 Decode pulse distance protocols for PulseDistanceWidthProtocolConstants. More...
 
void decodePulseDistanceWidthData_P (PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
 
void decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMicros, bool aIsPulseWidthProtocol, bool aMSBfirst)
 Decode pulse distance width protocols. More...
 
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 longer timing. More...
 
void decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, bool aMSBfirst)
 Old deprecated version with 3 timing parameters instead of one and a aIsPulseWidthProtocol flag. More...
 
void decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aZeroMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst) __attribute__((deprecated("Please use decodePulseDistanceWidthData() with 6 parameters.")))
 
bool decodeStrictPulseDistanceWidthData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst)
 
bool decodeBiPhaseData (uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset, uint_fast8_t aStartClockCount, uint_fast8_t aValueOfSpaceToMarkTransition, uint16_t aBiphaseTimeUnit)
 
void initBiphaselevel (uint_fast8_t aRCDecodeRawbuffOffset, uint16_t aBiphaseTimeUnit)
 
uint_fast8_t getBiphaselevel ()
 Gets the level of one time interval (aBiphaseTimeUnit) at a time from the raw buffer. More...
 
bool decodeBangOlufsen ()
 
bool decodeBoseWave ()
 
bool decodeDenon ()
 
bool decodeFAST ()
 
bool decodeJVC ()
 
bool decodeKaseikyo ()
 
bool decodeLegoPowerFunctions ()
 
bool decodeLG ()
 
bool decodeMagiQuest ()
 
bool decodeNEC ()
 Decodes also Onkyo and Apple. More...
 
bool decodeRC5 ()
 Try to decode data as RC5 protocol. More...
 
bool decodeRC6 ()
 Try to decode data as RC6 protocol. More...
 
bool decodeSamsung ()
 
bool decodeSharp ()
 
bool decodeSony ()
 
bool decodeWhynter ()
 
bool decodeDistanceWidth ()
 
bool decodeHash ()
 Decodes an arbitrary IR code to a 32-bit value. More...
 
bool decodeShuzu ()
 
bool decodeDenonOld (decode_results *aResults)
 
bool decodeJVCMSB (decode_results *aResults)
 
bool decodeLGMSB (decode_results *aResults)
 
bool decodeNECMSB (decode_results *aResults)
 
bool decodePanasonicMSB (decode_results *aResults)
 
bool decodeSonyMSB (decode_results *aResults)
 
bool decodeSAMSUNG (decode_results *aResults)
 
bool decodeHashOld (decode_results *aResults)
 
bool decode_old (decode_results *aResults)
 
bool decode (decode_results *aResults) __attribute__((deprecated("Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> .")))
 
void blink13 (uint8_t aEnableLEDFeedback) __attribute__((deprecated("Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback().")))
 Old deprecated function name for setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback() More...
 
void initDecodedIRData ()
 Is internally called by decode before calling decoders. More...
 
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. More...
 
bool checkHeader (PulseDistanceWidthProtocolConstants *aProtocolConstants)
 
bool checkHeader_P (PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM)
 
void checkForRepeatSpaceTicksAndSetFlag (uint16_t aMaximumRepeatSpaceTicks)
 
bool checkForRecordGapsMicros (Print *aSerial)
 Checks if protocol is not detected and detected space between two transmissions is smaller than known value for protocols (Sony with around 24 ms) More...
 

Static Public Member Functions

static void printActiveIRProtocols (Print *aSerial)
 

Public Attributes

and not your own IRrecv instance
 
bool it is not supported any more
 
irparams_struct irparams
 
IRData decodedIRData
 
decode_type_t lastDecodedProtocol
 
uint16_t lastDecodedAddress
 
uint16_t lastDecodedCommand
 
uint8_t repeatCount
 

Detailed Description

Definition at line 226 of file IRremoteInt.h.

Member Function Documentation

◆ decode()

bool IRrecv::decode ( decode_results aResults)

Definition at line 28 of file IRremote.h.

◆ decodeBangOlufsen()

bool IRrecv::decodeBangOlufsen ( )

Definition at line 298 of file ir_BangOlufsen.hpp.

◆ decodeBiPhaseData()

bool IRrecv::decodeBiPhaseData ( uint_fast8_t  aNumberOfBits,
IRRawlenType  aStartOffset,
uint_fast8_t  aStartClockCount,
uint_fast8_t  aValueOfSpaceToMarkTransition,
uint16_t  aBiphaseTimeUnit 
)

◆ decodeMagiQuest()

bool IRrecv::decodeMagiQuest ( )

Definition at line 155 of file ir_MagiQuest.hpp.

◆ decodePanasonicMSB()

bool IRrecv::decodePanasonicMSB ( decode_results aResults)

◆ decodeShuzu()

bool IRrecv::decodeShuzu ( )

Definition at line 139 of file ir_Template.hpp.

Member Data Documentation

◆ decodedIRData

IRData IRrecv::decodedIRData

Definition at line 409 of file IRremoteInt.h.

◆ instance

and not your own IRrecv IRrecv::instance

Definition at line 236 of file IRremoteInt.h.

◆ irparams

irparams_struct IRrecv::irparams

Definition at line 408 of file IRremoteInt.h.

◆ lastDecodedAddress

uint16_t IRrecv::lastDecodedAddress

Definition at line 413 of file IRremoteInt.h.

◆ lastDecodedCommand

uint16_t IRrecv::lastDecodedCommand

Definition at line 414 of file IRremoteInt.h.

◆ lastDecodedProtocol

decode_type_t IRrecv::lastDecodedProtocol

Definition at line 412 of file IRremoteInt.h.

◆ more

bool it is not supported any IRrecv::more

Definition at line 292 of file IRremoteInt.h.

◆ repeatCount

uint8_t IRrecv::repeatCount

Definition at line 419 of file IRremoteInt.h.


The documentation for this class was generated from the following files: