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

Method sendSamsungLG

src/ir_Samsung.hpp:146–162  ·  view source on GitHub ↗

* Sent e.g. by an LG 6711R1P071A remote * @param aAddress 16 bit address. If < 0x100, i.e. only 8 bit, then a (standard) 16 bit address <8_bit_address><8_bit_address> is generated. * @param aNumberOfRepeats If < 0 then only a special repeat frame will be sent */

Source from the content-addressed store, hash-verified

144 * @param aNumberOfRepeats If < 0 then only a special repeat frame will be sent
145 */
146void IRsend::sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
147 if (aNumberOfRepeats < 0) {
148 sendSamsungLGRepeat();
149 return;
150 }
151
152 // send 16 bit address and 8 command bits and then 8 inverted command bits LSB first
153 LongUnion tRawData;
154 tRawData.UWord.LowWord = aAddress;
155 if (aAddress < 0x100) { // This disables the sending of an (non standard?) 16 bit address with upper byte = 0 like 0x0014.
156 tRawData.UByte.MidLowByte = aAddress; // here we have 8 bit address which must be duplicated
157 }
158 tRawData.UByte.MidHighByte = aCommand;
159 tRawData.UByte.HighByte = ~aCommand;
160
161 sendPulseDistanceWidth_P(&SamsungLGProtocolConstants, tRawData.ULong, SAMSUNG_BITS, aNumberOfRepeats);
162}
163
164/**
165 * Here we send Samsung32

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected