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

Method sendApple

src/ir_NEC.hpp:210–221  ·  view source on GitHub ↗

* Apple: Send NEC with fixed 16 bit Apple address 0x87EE. * There is NO delay after the last sent repeat! * https://en.wikipedia.org/wiki/Apple_Remote * https://gist.github.com/darconeous/4437f79a34e3b6441628 * @param aNumberOfRepeats If < 0 then only a special repeat frame without leading and trailing space * will be sent by calling NECProtocolConstants.SpecialSendR

Source from the content-addressed store, hash-verified

208 * will be sent by calling NECProtocolConstants.SpecialSendRepeatFunction().
209 */
210void IRsend::sendApple(uint8_t aDeviceId, uint8_t aCommand, int_fast8_t aNumberOfRepeats) {
211 LongUnion tRawData;
212
213 // Address 16 bit LSB first fixed value of 0x87EE
214 tRawData.UWord.LowWord = APPLE_ADDRESS;
215
216 // send Apple code and then 8 command bits LSB first
217 tRawData.UByte.MidHighByte = aCommand;
218 tRawData.UByte.HighByte = aDeviceId; // e.g. 0xD7
219
220 sendPulseDistanceWidth_P(&NECProtocolConstants, tRawData.ULong, NEC_BITS, aNumberOfRepeats);
221}
222
223/**
224 * Sends NEC protocol

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected