RBE1001Lib
Public Member Functions | Private Types | Private Attributes
IRDecoder Class Reference

#include <IRdecoder.h>

Inheritance diagram for IRDecoder:
Inheritance graph
[legend]

Public Member Functions

 IRDecoder (uint8_t pin)
 
void init (void)
 
void handleIRsensor (void)
 
uint32_t getCode (void)
 
int16_t getKeyCode (bool acceptRepeat=false)
 

Private Types

enum  IR_STATE {
  IR_READY, IR_PREAMBLE, IR_REPEAT, IR_ACTIVE,
  IR_COMPLETE, IR_ERROR
}
 

Private Attributes

uint8_t irPin
 
IR_STATE state = IR_READY
 
volatile uint32_t lastReceiveTime = 0
 
volatile uint32_t currCode = 0
 
volatile uint8_t index = 0
 
volatile uint32_t fallingEdge = 0
 
volatile uint32_t risingEdge = 0
 
volatile uint32_t lastRisingEdge = 0
 

Detailed Description

Definition at line 28 of file IRdecoder.h.

Member Enumeration Documentation

◆ IR_STATE

enum IRDecoder::IR_STATE
private
Enumerator
IR_READY 
IR_PREAMBLE 
IR_REPEAT 
IR_ACTIVE 
IR_COMPLETE 
IR_ERROR 

Definition at line 31 of file IRdecoder.h.

Constructor & Destructor Documentation

◆ IRDecoder()

IRDecoder::IRDecoder ( uint8_t  pin)
inline

Definition at line 56 of file IRdecoder.h.

References handleIRsensor(), and init().

Here is the call graph for this function:

Member Function Documentation

◆ getCode()

uint32_t IRDecoder::getCode ( void  )
inline

Definition at line 60 of file IRdecoder.h.

References currCode, IR_COMPLETE, IR_READY, and IR_REPEAT.

◆ getKeyCode()

int16_t IRDecoder::getKeyCode ( bool  acceptRepeat = false)
inline

Definition at line 71 of file IRdecoder.h.

References IR_COMPLETE, IR_READY, and IR_REPEAT.

◆ handleIRsensor()

void IRDecoder::handleIRsensor ( void  )

◆ init()

void IRDecoder::init ( void  )

Definition at line 10 of file IRdecoder.cpp.

References handleIRsensor(), and irPin.

Referenced by IRDecoder().

Here is the call graph for this function:

Field Documentation

◆ currCode

volatile uint32_t IRDecoder::currCode = 0
private

Definition at line 47 of file IRdecoder.h.

Referenced by getCode(), and handleIRsensor().

◆ fallingEdge

volatile uint32_t IRDecoder::fallingEdge = 0
private

Definition at line 50 of file IRdecoder.h.

Referenced by handleIRsensor().

◆ index

volatile uint8_t IRDecoder::index = 0
private

Definition at line 48 of file IRdecoder.h.

Referenced by handleIRsensor().

◆ irPin

uint8_t IRDecoder::irPin
private

Definition at line 41 of file IRdecoder.h.

Referenced by handleIRsensor(), and init().

◆ lastReceiveTime

volatile uint32_t IRDecoder::lastReceiveTime = 0
private

Definition at line 45 of file IRdecoder.h.

Referenced by handleIRsensor().

◆ lastRisingEdge

volatile uint32_t IRDecoder::lastRisingEdge = 0
private

Definition at line 53 of file IRdecoder.h.

Referenced by handleIRsensor().

◆ risingEdge

volatile uint32_t IRDecoder::risingEdge = 0
private

Definition at line 51 of file IRdecoder.h.

Referenced by handleIRsensor().

◆ state

IR_STATE IRDecoder::state = IR_READY
private

Definition at line 43 of file IRdecoder.h.

Referenced by handleIRsensor().


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