MCPcopy Create free account
hub / github.com/Arduino-IRremote/Arduino-IRremote / handleReceivedTinyIRData

Function handleReceivedTinyIRData

src/IRCommandDispatcher.hpp:89–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87IRAM_ATTR
88# endif
89void handleReceivedTinyIRData() {
90 IRDispatcher.IRReceivedData.address = TinyIRReceiverData.Address;
91 IRDispatcher.IRReceivedData.command = TinyIRReceiverData.Command;
92 IRDispatcher.IRReceivedData.isRepeat = TinyIRReceiverData.Flags & IRDATA_FLAGS_IS_REPEAT;
93 IRDispatcher.IRReceivedData.MillisOfLastCode = millis();
94
95# if defined(LOCAL_INFO)
96 printTinyIRReceiverResultMinimal(&Serial);
97# endif
98
99# if defined(IR_ADDRESS)
100 // if available, compare address. TinyIRReceiverData.Address saves 6 bytes
101 if (TinyIRReceiverData.Address != IR_ADDRESS) { // IR_ADDRESS is defined in *IRCommandMapping.h
102 INFO_PRINT(F("Wrong address. Expected 0x"));
103 INFO_PRINTLN(IR_ADDRESS, HEX);
104 } else
105# endif
106 {
107 IRDispatcher.IRReceivedData.isAvailable = true;
108 // check if dispatcher enabled
109 if (!IRDispatcher.doNotUseDispatcher) {
110 /*
111 * Only short (non blocking) commands are executed directly in ISR (Interrupt Service Routine) context,
112 * others are stored for main loop which calls checkAndRunSuspendedBlockingCommands()
113 */
114 IRDispatcher.checkAndCallCommand(false);
115 }
116 }
117}
118
119#elif defined(USE_IRREMOTE_LIBRARY)
120/*********************************

Callers 1

TinyIRReceiver.hppFile · 0.85

Calls 2

checkAndCallCommandMethod · 0.80

Tested by

no test coverage detected