IRremote
IRrecv Class Reference

Main class for receiving IR signals. More...

#include <IRremoteInt.h>

Collaboration diagram for IRrecv:

Public Member Functions

 IRrecv ()
 Instantiate the IRrecv class. More...
 
 IRrecv (uint_fast8_t aReceivePin)
 
 IRrecv (uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin)
 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 protocol message has arrived. More...
 
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 start (uint32_t aMicrosecondsToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void startWithTicksToAdd (uint16_t aTicksToAddToGapCounter)
 
void restartAfterSend ()
 Restarts receiver after send. More...
 
bool available ()
 Returns true if IR receiver data is available. More...
 
IRDataread ()
 If IR receiver data is available, returns pointer to IrReceiver.decodedIRData, else NULL. More...
 
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 printIRResultRawFormatted (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the timings in IrReceiver.decodedIRData.rawDataPtr->rawbuf[] array 8 values per line. More...
 
void printIRResultAsCVariables (Print *aSerial)
 Print results as C variables to be used for sendXXX() More...
 
bool printIRResultShort (Print *aSerial, bool aPrintRepeatGap=true, bool aCheckForRecordGapsMicros=true)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
void printIRSendUsage (Print *aSerial)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
const char * getProtocolString ()
 
void compensateAndPrintIRResultAsCArray (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the IrReceiver.decodedIRData.rawDataPtr->rawbuf[] to be used as C definition for sendRaw(). More...
 
void compensateAndPrintIRResultAsPronto (Print *aSerial, unsigned int 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, unsigned int frequency=38000U)
 
bool decodePulseDistanceWidthData (PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset=3)
 Decode pulse distance protocols for PulseDistanceWidthProtocolConstants. More...
 
bool decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, unsigned int aOneMarkMicros, unsigned int aZeroMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroSpaceMicros, bool aMSBfirst)
 Decode pulse distance width protocols. More...
 
bool decodeBiPhaseData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, uint_fast8_t aStartClockCount, uint_fast8_t aValueOfSpaceToMarkTransition, unsigned int aBiphaseTimeUnit)
 
void initBiphaselevel (uint_fast8_t aRCDecodeRawbuffOffset, unsigned int 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 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 ()
 
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 (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 (unsigned int oldval, unsigned int newval)
 
bool checkHeader (PulseDistanceWidthProtocolConstants *aProtocolConstants)
 
void checkForRepeatSpaceAndSetFlag (unsigned int aMediumRepeatSpaceMicros)
 
bool checkForRecordGapsMicros (Print *aSerial)
 

Static Public Member Functions

static void printActiveIRProtocols (Print *aSerial)
 

Public Attributes

IRData decodedIRData
 
decode_type_t lastDecodedProtocol
 
uint32_t lastDecodedAddress
 
uint32_t lastDecodedCommand
 
uint8_t repeatCount
 

Detailed Description

Main class for receiving IR signals.

Definition at line 172 of file IRremoteInt.h.

Member Function Documentation

◆ compare()

uint_fast8_t IRrecv::compare ( unsigned int  oldval,
unsigned int  newval 
)

◆ decodeBangOlufsen()

bool IRrecv::decodeBangOlufsen ( )

Definition at line 286 of file ir_BangOlufsen.hpp.

◆ decodeBiPhaseData()

bool IRrecv::decodeBiPhaseData ( uint_fast8_t  aNumberOfBits,
uint_fast8_t  aStartOffset,
uint_fast8_t  aStartClockCount,
uint_fast8_t  aValueOfSpaceToMarkTransition,
unsigned int  aBiphaseTimeUnit 
)

◆ decodeHash()

bool IRrecv::decodeHash ( )

◆ decodeHashOld()

bool IRrecv::decodeHashOld ( decode_results aResults)

◆ decodeMagiQuest()

bool IRrecv::decodeMagiQuest ( )

Definition at line 151 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 305 of file IRremoteInt.h.

◆ lastDecodedAddress

uint32_t IRrecv::lastDecodedAddress

Definition at line 309 of file IRremoteInt.h.

◆ lastDecodedCommand

uint32_t IRrecv::lastDecodedCommand

Definition at line 310 of file IRremoteInt.h.

◆ lastDecodedProtocol

decode_type_t IRrecv::lastDecodedProtocol

Definition at line 308 of file IRremoteInt.h.

◆ repeatCount

uint8_t IRrecv::repeatCount

Definition at line 312 of file IRremoteInt.h.


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