* Denon frames are always sent 3 times. A non inverted (normal), an inverted frame, ending with a normal frame. * Repeats are done by just adding an inverted and a normal frame with no extra delay, so it is quite responsible :-) * If you specify a repeat of e.g. 3, then 3 + 6 frames are sent. * Measured at Denon RC 1081. */
| 127 | * Measured at Denon RC 1081. |
| 128 | */ |
| 129 | void IRsend::sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aSendSharpFrameMarker) { |
| 130 | // Set IR carrier frequency |
| 131 | enableIROut (DENON_KHZ); // 38 kHz |
| 132 | |
| 133 | // Add frame marker for sharp |
| 134 | uint16_t tCommand = aCommand; |
| 135 | // see https://github.com/Arduino-IRremote/Arduino-IRremote/issues/1272 |
| 136 | tCommand |= aSendSharpFrameMarker << 8; // the 2 upper bits are 00 for Denon and 01 or 10 for Sharp |
| 137 | |
| 138 | uint16_t tData = aAddress | ((uint16_t) tCommand << DENON_ADDRESS_BITS); |
| 139 | uint16_t tInvertedData = (tData ^ 0x7FE0); // Command and frame (upper 10 bits, bit 5 to 14) are inverted |
| 140 | |
| 141 | uint_fast8_t tNumberOfCommands = aNumberOfRepeats + 1; |
| 142 | while (tNumberOfCommands > 0) { |
| 143 | |
| 144 | // Data |
| 145 | sendPulseDistanceWidthData_P(&DenonProtocolConstants, tData, DENON_BITS); |
| 146 | |
| 147 | // Inverted autorepeat frame |
| 148 | delay(DENON_AUTO_REPEAT_DISTANCE / MICROS_IN_ONE_MILLI); |
| 149 | sendPulseDistanceWidthData_P(&DenonProtocolConstants, tInvertedData, DENON_BITS); |
| 150 | |
| 151 | tNumberOfCommands--; |
| 152 | // send repeated command with a fixed space gap |
| 153 | delay( DENON_AUTO_REPEAT_DISTANCE / MICROS_IN_ONE_MILLI); |
| 154 | } |
| 155 | /* |
| 156 | * always end with a normal frame |
| 157 | * skip last delay! |
| 158 | */ |
| 159 | sendPulseDistanceWidthData_P(&DenonProtocolConstants, tData, DENON_BITS); |
| 160 | |
| 161 | } |
| 162 | |
| 163 | bool IRrecv::decodeSharp() { |
| 164 | return decodeDenon(); |
nothing calls this directly
no outgoing calls
no test coverage detected