IRremote
|
Classes | |
struct | TinyIRReceiverStruct |
Control and data variables of the state machine for TinyReceiver. More... | |
struct | TinyIRReceiverCallbackDataStruct |
Can be used by the callback to transfer received data to main loop for further processing. More... | |
Functions | |
void | handleReceivedTinyIRData (uint16_t aAddress, uint16_t aCommand, uint8_t aFlags) |
bool | initPCIInterruptForTinyReceiver () |
Sets IR_INPUT_PIN mode to INPUT, and if IR_FEEDBACK_LED_PIN is defined, sets feedback LED output mode. More... | |
bool | enablePCIInterruptForTinyReceiver () |
Initializes hardware interrupt generation according to IR_INPUT_PIN or use attachInterrupt() function. More... | |
void | disablePCIInterruptForTinyReceiver () |
bool | isTinyReceiverIdle () |
void | printTinyReceiverResultMinimal (uint8_t aAddress, uint8_t aCommand, uint8_t aFlags, Print *aSerial) |
void | sendFast8BitAndParity (uint8_t aSendPin, uint8_t aCommand, uint_fast8_t aNumberOfRepeats=0) |
void | sendNECMinimal (uint8_t aSendPin, uint8_t aCommand, uint_fast8_t aNumberOfRepeats=0) |
void | handleReceivedIRData (uint16_t aAddress, uint8_t aCommand, bool isRepetition) |
Declaration of the callback function provided by the user application. More... | |
void | IRPinChangeInterruptHandler (void) |
The ISR (Interrupt Service Routine) of TinyIRRreceiver. More... | |
Variables | |
TinyIRReceiverStruct | TinyIRReceiverControl |
#define FAST_8_BIT_PARITY_ADDRESS_BITS 0 |
FAST_8_BIT_CS Protocol characteristics:
#define FAST_8_BIT_PARITY_BIT_MARK FAST_8_BIT_PARITY_UNIT |
#define FAST_8_BIT_PARITY_BITS (FAST_8_BIT_PARITY_ADDRESS_BITS + FAST_8_BIT_PARITY_COMMAND_BITS) |
#define FAST_8_BIT_PARITY_HEADER_MARK (4 * FAST_8_BIT_PARITY_UNIT) |
#define FAST_8_BIT_PARITY_HEADER_SPACE (FAST_8_BIT_PARITY_ONE_SPACE) |
#define FAST_8_BIT_PARITY_MAXIMUM_REPEAT_DISTANCE (FAST_8_BIT_PARITY_REPEAT_DISTANCE + 10000) |
#define FAST_8_BIT_PARITY_ONE_SPACE (3 * FAST_8_BIT_PARITY_UNIT) |
#define FAST_8_BIT_PARITY_REPEAT_DISTANCE (FAST_8_BIT_PARITY_REPEAT_PERIOD - (40 * FAST_8_BIT_PARITY_UNIT)) |
#define FAST_8_BIT_PARITY_ZERO_SPACE FAST_8_BIT_PARITY_UNIT |
#define IR_INPUT_PIN 2 |
Definition at line 104 of file TinyIRReceiver.hpp.
#define IRDATA_FLAGS_PARITY_FAILED 0x04 |
#define lowerValue25Percent | ( | aDuration | ) | (aDuration - (aDuration / 4)) |
#define NEC_ADDRESS_BITS 16 |
Timing for NEC protocol.
see: https://www.sbprojects.net/knowledge/ir/nec.php LSB first, 1 start bit + 16 bit address + 8 bit data + 8 bit inverted data + 1 stop bit.
#define NEC_BITS (NEC_ADDRESS_BITS + NEC_COMMAND_BITS) |
#define NEC_MAXIMUM_REPEAT_DISTANCE (NEC_REPEAT_PERIOD - NEC_MINIMAL_DURATION + 10000) |
#define TINY_ADDRESS_BITS NEC_ADDRESS_BITS |
#define TINY_BIT_MARK NEC_BIT_MARK |
#define TINY_COMMAND_BITS NEC_COMMAND_BITS |
#define TINY_HEADER_MARK NEC_HEADER_MARK |
#define TINY_HEADER_SPACE NEC_HEADER_SPACE |
#define TINY_MAXIMUM_REPEAT_DISTANCE NEC_MAXIMUM_REPEAT_DISTANCE |
#define TINY_ONE_SPACE NEC_ONE_SPACE |
#define TINY_RECEIVER_USE_ARDUINO_ATTACH_INTERRUPT |
Definition at line 123 of file TinyIRReceiver.hpp.
#define TINY_ZERO_SPACE NEC_ZERO_SPACE |
#define upperValue25Percent | ( | aDuration | ) | (aDuration + (aDuration / 4)) |
#define upperValue50Percent | ( | aDuration | ) | (aDuration + (aDuration / 2)) |
#define USE_ATTACH_INTERRUPT |
Definition at line 444 of file TinyIRReceiver.hpp.
void disablePCIInterruptForTinyReceiver | ( | ) |
Definition at line 574 of file TinyIRReceiver.hpp.
bool enablePCIInterruptForTinyReceiver | ( | ) |
Initializes hardware interrupt generation according to IR_INPUT_PIN or use attachInterrupt() function.
Definition at line 508 of file TinyIRReceiver.hpp.
void handleReceivedIRData | ( | uint16_t | aAddress, |
uint8_t | aCommand, | ||
bool | isRepetition | ||
) |
Declaration of the callback function provided by the user application.
It is called every time a complete IR command or repeat was received.
void handleReceivedTinyIRData | ( | uint16_t | aAddress, |
uint16_t | aCommand, | ||
uint8_t | aFlags | ||
) |
bool initPCIInterruptForTinyReceiver | ( | ) |
Sets IR_INPUT_PIN mode to INPUT, and if IR_FEEDBACK_LED_PIN is defined, sets feedback LED output mode.
Then call enablePCIInterruptForTinyReceiver()
Definition at line 393 of file TinyIRReceiver.hpp.
void IRPinChangeInterruptHandler | ( | void | ) |
The ISR (Interrupt Service Routine) of TinyIRRreceiver.
It handles the NEC protocol decoding and calls the user callback function on complete. 5 us + 3 us for push + pop for a 16MHz ATmega
Definition at line 139 of file TinyIRReceiver.hpp.
bool isTinyReceiverIdle | ( | ) |
Definition at line 385 of file TinyIRReceiver.hpp.
void printTinyReceiverResultMinimal | ( | uint8_t | aAddress, |
uint8_t | aCommand, | ||
uint8_t | aFlags, | ||
Print * | aSerial | ||
) |
Definition at line 405 of file TinyIRReceiver.hpp.
void sendFast8BitAndParity | ( | uint8_t | aSendPin, |
uint8_t | aCommand, | ||
uint_fast8_t | aNumberOfRepeats = 0 |
||
) |
Definition at line 147 of file TinyIRSender.hpp.
void sendNECMinimal | ( | uint8_t | aSendPin, |
uint8_t | aCommand, | ||
uint_fast8_t | aNumberOfRepeats = 0 |
||
) |
TinyIRReceiverStruct TinyIRReceiverControl |
Definition at line 89 of file TinyIRReceiver.hpp.