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

Method computeOpenLASIRRawCommand

src/ir_OpenLASIR.hpp:170–177  ·  view source on GitHub ↗

* Compute the raw 32-bit data for an OpenLASIR frame from 8-bit address, 8-bit DeviceID, 5-bit Mode and 3-bit Data. * * @param aAddress 8-bit address (Block ID). Only lower 8 bits are used. * @param aDeviceID 8-bit Device ID. * @param aMode 5-bit Mode. * @param aData 3-bit Data (color, etc.). * @return 32-bit raw data ready for transmission. */

Source from the content-addressed store, hash-verified

168 * @return 32-bit raw data ready for transmission.
169 */
170uint16_t IRsend::computeOpenLASIRRawCommand(uint8_t aDeviceID, uint8_t aMode, uint8_t aData) {
171 WordUnion tRawCommand;
172
173 tRawCommand.UByte.LowByte = aDeviceID;
174 tRawCommand.UByte.HighByte = (aMode & 0x1F) | ((aData & 0x07) << 5);
175
176 return tRawCommand.UWord;
177}
178
179/**
180 * Send an OpenLASIR frame with special NEC-style repeats.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected