IRremote
ir_Samsung.hpp
Go to the documentation of this file.
1 /*
2  * ir_Samsung.hpp
3  *
4  * Contains functions for receiving and sending Samsung IR Protocol in "raw" and standard format with 16 bit address and 16 or 32 bit command
5  *
6  * This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
7  *
8  ************************************************************************************
9  * MIT License
10  *
11  * Copyright (c) 2017-2025 Darryl Smith, Armin Joachimsmeyer
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a copy
14  * of this software and associated documentation files (the "Software"), to deal
15  * in the Software without restriction, including without limitation the rights
16  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17  * copies of the Software, and to permit persons to whom the Software is furnished
18  * to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included in all
21  * copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
24  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
25  * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
27  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONSAMSUNGTION WITH THE SOFTWARE
28  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29  *
30  ************************************************************************************
31  */
32 #ifndef _IR_SAMSUNG_HPP
33 #define _IR_SAMSUNG_HPP
34 
35 #include "LocalDebugLevelStart.h"
36 
40 //==============================================================================
41 // SSSS AAA MMM SSSS U U N N GGGG
42 // S A A M M M S U U NN N G
43 // SSS AAAAA M M M SSS U U N N N G GG
44 // S A A M M S U U N NN G G
45 // SSSS A A M M SSSS UUU N N GGG
46 //==============================================================================
47 /*
48  * Address=0xFFF1 Command=0x76 Raw-Data=0x8976FFF1
49  +4500,-4400
50  + 600,-1600 + 650,- 500 + 600,- 500 + 650,- 500
51  + 600,-1650 + 600,-1600 + 650,-1600 + 600,-1650
52  + 600,-1600 + 600,-1650 + 600,-1650 + 600,-1600
53  + 600,-1650 + 600,-1650 + 600,-1600 + 600,-1650
54  + 600,- 500 + 650,-1600 + 600,-1650 + 600,- 500
55  + 650,-1600 + 600,-1650 + 600,-1650 + 600,- 500
56  + 600,-1650 + 600,- 500 + 600,- 550 + 600,-1600
57  + 600,- 550 + 600,- 550 + 550,- 550 + 600,-1650
58  + 550
59  Sum: 68750
60  * Values are like NEC except SAMSUNG_HEADER_MARK (4500 instead of 9000)
61  */
62 /*
63  * Samsung repeat frame can be the original frame again or a special short repeat frame,
64  * then we call the protocol SamsungLG. They differ only in the handling of repeat,
65  * so we can not decide for the first frame which protocol is used.
66  */
67 // see http://www.hifi-remote.com/wiki/index.php?title=DecodeIR#Samsung
68 // https://www.mikrocontroller.net/articles/IRMP_-_english#SAMSUNG32
69 // https://www.mikrocontroller.net/articles/IRMP_-_english#SAMSUNG48
70 // LSB first, 1 start bit + 16 bit address + 16 or 32 bit data + 1 stop bit.
71 // Here https://forum.arduino.cc/t/klimaanlage-per-ir-steuern/1051381/10 the address (0xB24D) is also 8 bits and then 8 inverted bits
72 //
73 // Here https://github.com/flipperdevices/flipperzero-firmware/blob/master/lib/infrared/encoder_decoder/samsung/infrared_decoder_samsung.c#L18
74 // Address is 8 bit + same 8 bit if command is 8 bit and ~8 bit.
75 //
76 // So we assume 8 bit address, if command is 8 bit and ~8 bit!
77 //
78 // IRP notation: {38k,5553}<1,-1|1,-3>(8,-8,D:8,S:8,F:8,~F:8,1,^110)+ ==> 8 bit + 8 bit inverted data - Samsung32
79 // IRP notation: {38k,5553}<1,-1|1,-3>(8,-8,D:8,S:8,F:16,1,^110)+ ==> 16 bit data - still Samsung32
80 // IRP notation: {38k,5553}<1,-1|1,-3>(8,-8,D:8,S:8,F:8,~F:8,G:8,~G:8,1,^110)+ ==> 2 x (8 bit + 8 bit inverted data) - Samsung48
81 //
82 #define SAMSUNG_ADDRESS_BITS 16
83 #define SAMSUNG_COMMAND16_BITS 16
84 #define SAMSUNG_COMMAND32_BITS 32
85 #define SAMSUNG_BITS (SAMSUNG_ADDRESS_BITS + SAMSUNG_COMMAND16_BITS)
86 #define SAMSUNG48_BITS (SAMSUNG_ADDRESS_BITS + SAMSUNG_COMMAND32_BITS)
87 
88 // Values are like NEC except SAMSUNG_HEADER_MARK (4500 instead of 9000)
89 #define SAMSUNG_UNIT 560 // 21.28 periods of 38 kHz, 11.2 ticks TICKS_LOW = 8.358 TICKS_HIGH = 15.0
90 #define SAMSUNG_HEADER_MARK (8 * SAMSUNG_UNIT) // 4500 | 180 periods
91 #define SAMSUNG_HEADER_SPACE (8 * SAMSUNG_UNIT) // 4500
92 #define SAMSUNG_BIT_MARK SAMSUNG_UNIT
93 #define SAMSUNG_ONE_SPACE (3 * SAMSUNG_UNIT) // 1690 | 33.8 TICKS_LOW = 25.07 TICKS_HIGH = 45.0
94 #define SAMSUNG_ZERO_SPACE SAMSUNG_UNIT
95 
96 #define SAMSUNG_AVERAGE_DURATION 55000 // SAMSUNG_HEADER_MARK + SAMSUNG_HEADER_SPACE + 32 * 2,5 * SAMSUNG_UNIT + SAMSUNG_UNIT // 2.5 because we assume more zeros than ones
97 #define SAMSUNG_REPEAT_DURATION (SAMSUNG_HEADER_MARK + SAMSUNG_HEADER_SPACE + SAMSUNG_BIT_MARK + SAMSUNG_ZERO_SPACE + SAMSUNG_BIT_MARK)
98 #define SAMSUNG_REPEAT_PERIOD 110000 // Commands are repeated every 110 ms (measured from start to start) for as long as the key on the remote control is held down.
99 #define SAMSUNG_MAXIMUM_REPEAT_DISTANCE (SAMSUNG_REPEAT_PERIOD + (SAMSUNG_REPEAT_PERIOD / 4)) // 137000 - Just a guess
100 
101 // 19 byte RAM
102 struct PulseDistanceWidthProtocolConstants const SamsungProtocolConstants PROGMEM = {SAMSUNG, SAMSUNG_KHZ, SAMSUNG_HEADER_MARK,
105 
106 struct PulseDistanceWidthProtocolConstants const SamsungLGProtocolConstants PROGMEM = {SAMSUNGLG, SAMSUNG_KHZ, SAMSUNG_HEADER_MARK,
109 /************************************
110  * Start of send and decode functions
111  ************************************/
112 
119  enableIROut (SAMSUNG_KHZ); // 38 kHz
120  mark(SAMSUNG_HEADER_MARK); // + 4500
121  space(SAMSUNG_HEADER_SPACE); // - 4500
122  mark(SAMSUNG_BIT_MARK); // + 560
123  space(SAMSUNG_ZERO_SPACE); // - 560
124  mark(SAMSUNG_BIT_MARK); // + 560
125 }
126 
133  IrSender.enableIROut(SAMSUNG_KHZ); // 38 kHz
134  IrSender.mark(SAMSUNG_HEADER_MARK); // + 4500
136  IrSender.mark(SAMSUNG_BIT_MARK); // + 560
138  IrSender.mark(SAMSUNG_BIT_MARK); // + 560
139 }
140 
141 /*
142  * Sent e.g. by an LG 6711R1P071A remote
143  * @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.
144  * @param aNumberOfRepeats If < 0 then only a special repeat frame will be sent
145  */
146 void IRsend::sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
147  if (aNumberOfRepeats < 0) {
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 
172 void IRsend::sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
173 
174  LongUnion tSendValue;
175  if (aAddress < 0x100) {
176  // This makes it flipper IRDB compatible:
177  // https://github.com/flipperdevices/flipperzero-firmware/blob/master/lib/infrared/encoder_decoder/samsung/infrared_decoder_samsung.c#L18
178  // Duplicate address byte, if address is only 8 bit
179  tSendValue.UBytes[1] = aAddress;
180  tSendValue.UBytes[0] = aAddress;
181  } else {
182  tSendValue.UWords[0] = aAddress;
183  }
184 
185  if (aCommand < 0x100) {
186  // Send 8 command bits and then 8 inverted command bits LSB first
187  tSendValue.UBytes[2] = aCommand;
188  tSendValue.UBytes[3] = ~aCommand;
189 
190  } else {
191  // Send 16 command bits
192  tSendValue.UWords[1] = aCommand;
193  }
194 
195  sendPulseDistanceWidth_P(&SamsungProtocolConstants, tSendValue.ULong, SAMSUNG_BITS, aNumberOfRepeats);
196 }
197 
203 void IRsend::sendSamsung16BitAddressAnd8BitCommand(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats) {
204 
205  LongUnion tSendValue;
206  // send 16 bit address
207  tSendValue.UWords[0] = aAddress;
208  // Send 8 command bits and then 8 inverted command bits LSB first
209  tSendValue.UBytes[2] = aCommand;
210  tSendValue.UBytes[3] = ~aCommand;
211 
212  sendPulseDistanceWidth_P(&SamsungProtocolConstants, tSendValue.ULong, SAMSUNG_BITS, aNumberOfRepeats);
213 }
214 
220 void IRsend::sendSamsung16BitAddressAndCommand(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
221 
222  LongUnion tSendValue;
223  // send 16 bit address
224  tSendValue.UWords[0] = aAddress;
225  // Send 16 command bits
226  tSendValue.UWords[1] = aCommand;
227 
228  sendPulseDistanceWidth_P(&SamsungProtocolConstants, tSendValue.ULong, SAMSUNG_BITS, aNumberOfRepeats);
229 }
234 void IRsend::sendSamsung48(uint16_t aAddress, uint32_t aCommand, int_fast8_t aNumberOfRepeats) {
235 
236  // send 16 bit address and 2 x ( 8 command bits and then 8 inverted command bits) LSB first
237 #if __INT_WIDTH__ < 32
238  uint32_t tRawSamsungData[2]; // prepare 2 long for Samsung48
239 
240  LongUnion tSendValue;
241  tSendValue.UWords[0] = aAddress;
242  tSendValue.UBytes[2] = aCommand;
243  tSendValue.UBytes[3] = ~aCommand;
244  uint8_t tUpper8BitsOfCommand = aCommand >> 8;
245  tRawSamsungData[1] = tUpper8BitsOfCommand | (~tUpper8BitsOfCommand) << 8;
246  tRawSamsungData[0] = tSendValue.ULong;
247 
248  sendPulseDistanceWidthFromArray_P(&SamsungProtocolConstants, &tRawSamsungData[0], SAMSUNG48_BITS, aNumberOfRepeats);
249 #else
250  LongLongUnion tSendValue;
251  tSendValue.UWords[0] = aAddress;
252  if (aCommand < 0x10000) {
253  tSendValue.UBytes[2] = aCommand;
254  tSendValue.UBytes[3] = ~aCommand;
255  uint8_t tUpper8BitsOfCommand = aCommand >> 8;
256  tSendValue.UBytes[4] = tUpper8BitsOfCommand;
257  tSendValue.UBytes[5] = ~tUpper8BitsOfCommand;
258  } else {
259  tSendValue.ULongLong = aAddress | aCommand << 16;
260  }
261  sendPulseDistanceWidth_P(&SamsungProtocolConstants, tSendValue.ULongLong, SAMSUNG48_BITS, aNumberOfRepeats);
262 #endif
263 }
264 
265 /*
266  * We cannot decode frames with 8 command bits and then 8 inverted command bits LSB and 16 bit address,
267  * because in this case we always assume 8 bit address.
268  * This is, because we did not see 8 bit command and real 16 bit address in the wild.
269  */
271 
272  // Check we have enough data (68). The +4 is for initial gap, start bit mark and space + stop bit mark
273  if (decodedIRData.rawlen != ((2 * SAMSUNG_BITS) + 4) && decodedIRData.rawlen != ((2 * SAMSUNG48_BITS) + 4)
274  && (decodedIRData.rawlen != 6)) {
275  DEBUG_PRINT(F("Samsung: Data length="));
277  DEBUG_PRINTLN(F(" is not 6 or 68 or 100"));
278  return false;
279  }
280 
281  if (!checkHeader_P(&SamsungProtocolConstants)) {
282  return false;
283  }
284 
285  // Check for SansungLG style repeat
286  if (decodedIRData.rawlen == 6) {
291  return true;
292  }
293 
294  /*
295  * Decode first 32 bits
296  */
297  decodePulseDistanceWidthData_P(&SamsungProtocolConstants, SAMSUNG_BITS, 3);
298  LongUnion tValue;
301 
302  if (decodedIRData.rawlen == (2 * SAMSUNG48_BITS) + 4) {
303  /*
304  * Samsung48
305  */
306  // decode additional 16 bit
308  3 + (2 * SAMSUNG_BITS));
309 
310  /*
311  * LSB data is already in tValue.UWord.HighWord!
312  * Put latest (MSB) bits in LowWord, LSB first would have them expect in HighWord so keep this in mind for decoding below
313  */
314  tValue.UWord.LowWord = decodedIRData.decodedRawData; // We have only 16 bit in decodedRawData here
315 #if __INT_WIDTH__ >= 32
316  // workaround until complete refactoring for 64 bit
317  decodedIRData.decodedRawData = (decodedIRData.decodedRawData << 32)| tValue.UWord.HighWord << 16 | decodedIRData.address; // store all 48 bits in decodedRawData
318 #endif
319 
320  /*
321  * Check parity of 32 bit command
322  */
323  // receive 2 * (8 bits then 8 inverted bits) LSB first
324  if (tValue.UByte.MidHighByte != (uint8_t)(~tValue.UByte.HighByte)
325  && tValue.UByte.LowByte != (uint8_t)(~tValue.UByte.MidLowByte)) {
327  }
328 
329  decodedIRData.command = tValue.UByte.LowByte << 8 | tValue.UByte.MidHighByte; // low and high word are swapped here, so fetch it this way
332 
333  } else {
334  /*
335  * Samsung32
336  * check if we have 8 bit command and / or 8 bit address
337  */
338  if (tValue.UByte.MidHighByte == (uint8_t)(~tValue.UByte.HighByte)) {
339  // 8 bit command
340  decodedIRData.command = tValue.UByte.MidHighByte; // first 8 bit
341  } else {
342  // 16 bit command
344  }
345 
346  if (tValue.UByte.MidLowByte == tValue.UByte.LowByte) {
347  decodedIRData.address = tValue.UByte.LowByte; // 8 bit address as seen for a LG HX906 A/V Receive E8172C2C
348  }
349 
352  }
353 
354  // check for repeat
356 
357  return true;
358 }
359 
360 // Old version with MSB first
362  unsigned int offset = 1; // Skip first space
363 
364  // Initial mark
365  if (!matchMark(aResults->rawbuf[offset], SAMSUNG_HEADER_MARK)) {
366  return false;
367  }
368  offset++;
369 
370  // Check for repeat -- like a NEC repeat
371  if ((aResults->rawlen == 4) && matchSpace(aResults->rawbuf[offset], 2250)
372  && matchMark(aResults->rawbuf[offset + 1], SAMSUNG_BIT_MARK)) {
373  aResults->bits = 0;
374  aResults->value = 0xFFFFFFFF;
377  return true;
378  }
379  if (aResults->rawlen < (2 * SAMSUNG_BITS) + 4) {
380  return false;
381  }
382 
383  // Initial space
384  if (!matchSpace(aResults->rawbuf[offset], SAMSUNG_HEADER_SPACE)) {
385  return false;
386  }
387  offset++;
388 
390 
391  aResults->value = decodedIRData.decodedRawData;
392  aResults->bits = SAMSUNG_BITS;
393  aResults->decode_type = SAMSUNG;
395  return true;
396 }
397 
398 // Old version with MSB first
399 void IRsend::sendSamsungMSB(unsigned long data, int nbits) {
400  // Set IR carrier frequency
402 
403  // Header
406 
407  // Old version with MSB first Data + stop bit
410 }
411 void IRsend::sendSAMSUNG(unsigned long data, int nbits) {
412  sendSamsungMSB(data, nbits);
413 }
414 
416 #include "LocalDebugLevelEnd.h"
417 
418 #endif // _IR_SAMSUNG_HPP
IRData::address
uint16_t address
Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << ...
Definition: IRremoteInt.h:164
LongLongUnion::UBytes
uint8_t UBytes[8]
Definition: LongUnion.h:138
MICROS_PER_TICK
#define MICROS_PER_TICK
microseconds per clock interrupt tick
Definition: IRremote.hpp:133
LongUnion
Union to specify parts / manifestations of a 32 bit Long without casts and shifts.
Definition: LongUnion.h:59
SAMSUNG_HEADER_SPACE
#define SAMSUNG_HEADER_SPACE
Definition: ir_Samsung.hpp:91
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:193
decode_results::rawbuf
uint16_t * rawbuf
Definition: IRremoteInt.h:204
IRrecv::decodePulseDistanceWidthData
void decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
Definition: IRReceive.hpp:1076
IRsend::sendSamsungMSB
void sendSamsungMSB(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:399
PROTOCOL_IS_MSB_FIRST
#define PROTOCOL_IS_MSB_FIRST
Definition: IRProtocol.h:156
IRData::numberOfBits
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
Definition: IRremoteInt.h:173
DEBUG_PRINT
#define DEBUG_PRINT(...)
Definition: LocalDebugLevelStart.h:79
IRsend::aNumberOfRepeats
void int_fast8_t aNumberOfRepeats
Definition: IRremoteInt.h:528
IRrecv::decodePulseDistanceWidthData_P
void decodePulseDistanceWidthData_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
Definition: IRReceive.hpp:1112
MICROS_IN_ONE_MILLI
#define MICROS_IN_ONE_MILLI
Definition: IRremote.hpp:217
IRrecv::checkHeader_P
bool checkHeader_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM)
Definition: IRReceive.hpp:1228
LongUnion::UByte
struct LongUnion::@4 UByte
PROTOCOL_IS_PULSE_DISTANCE
#define PROTOCOL_IS_PULSE_DISTANCE
Definition: IRProtocol.h:151
IRsend::mark
void mark(uint16_t aMarkMicros)
Sends an IR mark for the specified number of microseconds.
Definition: IRSend.hpp:1247
IRsend::sendSamsungLGRepeat
void sendSamsungLGRepeat()
Send repeat Repeat commands should be sent in a 110 ms raster.
Definition: ir_Samsung.hpp:118
IRsend::sendSamsung48
void sendSamsung48(uint16_t aAddress, uint32_t aCommand, int_fast8_t aNumberOfRepeats)
Here we send Samsung48 We send 2 x (8 bit command and then ~command)
Definition: ir_Samsung.hpp:234
IRDATA_FLAGS_IS_REPEAT
#define IRDATA_FLAGS_IS_REPEAT
The gap between the preceding frame is as smaller than the maximum gap expected for a repeat....
Definition: IRProtocol.h:125
LongUnion::UBytes
uint8_t UBytes[4]
Definition: LongUnion.h:91
SAMSUNG
@ SAMSUNG
Definition: IRProtocol.h:100
LongUnion::LowByte
uint8_t LowByte
Definition: LongUnion.h:61
LongUnion::HighByte
uint8_t HighByte
Definition: LongUnion.h:64
decode_results::bits
uint8_t bits
Definition: IRremoteInt.h:199
decode_results::decode_type
decode_type_t decode_type
Definition: IRremoteInt.h:196
IRrecv::checkForRepeatSpaceTicksAndSetFlag
void checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks)
Definition: IRReceive.hpp:1248
PROGMEM
struct PulseDistanceWidthProtocolConstants const SamsungProtocolConstants PROGMEM
Definition: ir_Samsung.hpp:102
LongUnion::LowWord
uint16_t LowWord
Definition: LongUnion.h:80
SAMSUNG_BITS
#define SAMSUNG_BITS
Definition: ir_Samsung.hpp:85
matchSpace
bool matchSpace(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for spaces shortened by demodulator hardware.
Definition: IRReceive.hpp:1375
LongLongUnion
Union to specify parts / manifestations of a 64 bit LongLong without casts and shifts.
Definition: LongUnion.h:107
IRsend::sendSamsung
void sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Here we send Samsung32 If we get a command < 0x100, we send command and then ~command If we get an ad...
Definition: ir_Samsung.hpp:172
LocalDebugLevelStart.h
IRDATA_FLAGS_PARITY_FAILED
#define IRDATA_FLAGS_PARITY_FAILED
The current (autorepeat) frame violated parity check.
Definition: IRProtocol.h:127
decode_results::value
uint32_t value
Definition: IRremoteInt.h:198
LongUnion::MidLowByte
uint8_t MidLowByte
Definition: LongUnion.h:62
IRrecv::decodeSAMSUNG
bool decodeSAMSUNG(decode_results *aResults)
Definition: ir_Samsung.hpp:361
PulseDistanceWidthProtocolConstants
Definition: IRProtocol.h:139
IRsend::sendPulseDistanceWidth_P
void sendPulseDistanceWidth_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:1158
LongUnion::HighWord
uint16_t HighWord
Definition: LongUnion.h:81
IRrecv::decodedIRData
IRData decodedIRData
Definition: IRremoteInt.h:401
SAMSUNG_KHZ
#define SAMSUNG_KHZ
Definition: IRProtocol.h:173
IRsend::sendSamsung16BitAddressAndCommand
void sendSamsung16BitAddressAndCommand(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Maybe no one needs it in the wild...
Definition: ir_Samsung.hpp:220
IRrecv::decodeSamsung
bool decodeSamsung()
Definition: ir_Samsung.hpp:270
IRData::flags
uint8_t flags
IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above.
Definition: IRremoteInt.h:174
IRsend::sendSamsungLG
void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Samsung.hpp:146
PROTOCOL_IS_LSB_FIRST
#define PROTOCOL_IS_LSB_FIRST
Definition: IRProtocol.h:157
SAMSUNG_BIT_MARK
#define SAMSUNG_BIT_MARK
Definition: ir_Samsung.hpp:92
IRDATA_FLAGS_IS_PROTOCOL_WITH_DIFFERENT_REPEAT
#define IRDATA_FLAGS_IS_PROTOCOL_WITH_DIFFERENT_REPEAT
Here we have a repeat of type NEC2 or SamsungLG.
Definition: IRProtocol.h:131
sendSamsungLGSpecialRepeat
void sendSamsungLGSpecialRepeat()
Like above, but implemented as a static function Used for sending special repeat frame.
Definition: ir_Samsung.hpp:132
IRData::command
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
Definition: IRremoteInt.h:165
IRData::decodedRawData
IRDecodedRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send<protocol>Raw functions.
Definition: IRremoteInt.h:167
SAMSUNG_MAXIMUM_REPEAT_DISTANCE
#define SAMSUNG_MAXIMUM_REPEAT_DISTANCE
Definition: ir_Samsung.hpp:99
SAMSUNG_COMMAND16_BITS
#define SAMSUNG_COMMAND16_BITS
Definition: ir_Samsung.hpp:83
SAMSUNG_ZERO_SPACE
#define SAMSUNG_ZERO_SPACE
Definition: ir_Samsung.hpp:94
matchMark
bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
Definition: IRReceive.hpp:1327
IRsend::sendPulseDistanceWidthFromArray_P
void sendPulseDistanceWidthFromArray_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:1139
LongUnion::ULong
uint32_t ULong
Definition: LongUnion.h:95
IRrecv::lastDecodedCommand
uint16_t lastDecodedCommand
Definition: IRremoteInt.h:406
DEBUG_PRINTLN
#define DEBUG_PRINTLN(...)
Definition: LocalDebugLevelStart.h:80
IrSender
IRsend IrSender
Definition: IRSend.hpp:62
SAMSUNG48_BITS
#define SAMSUNG48_BITS
Definition: ir_Samsung.hpp:86
IRsend::sendSamsung16BitAddressAnd8BitCommand
void sendSamsung16BitAddressAnd8BitCommand(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
Maybe no one needs it in the wild...
Definition: ir_Samsung.hpp:203
IRDATA_FLAGS_IS_LSB_FIRST
#define IRDATA_FLAGS_IS_LSB_FIRST
Definition: IRProtocol.h:134
LongLongUnion::UWords
uint16_t UWords[4]
Definition: LongUnion.h:140
LongLongUnion::ULongLong
uint64_t ULongLong
Definition: LongUnion.h:142
SAMSUNG_REPEAT_PERIOD
#define SAMSUNG_REPEAT_PERIOD
Definition: ir_Samsung.hpp:98
SAMSUNG_HEADER_MARK
#define SAMSUNG_HEADER_MARK
Definition: ir_Samsung.hpp:90
IRsend::space
static void space(uint16_t aSpaceMicros)
Sends an IR space for the specified number of microseconds.
Definition: IRSend.hpp:1458
SAMSUNG_COMMAND32_BITS
#define SAMSUNG_COMMAND32_BITS
Definition: ir_Samsung.hpp:84
SAMSUNG_ONE_SPACE
#define SAMSUNG_ONE_SPACE
Definition: ir_Samsung.hpp:93
IRData::rawlen
IRRawlenType rawlen
Counter of entries in rawbuf of last received frame.
Definition: IRremoteInt.h:182
LongUnion::MidHighByte
uint8_t MidHighByte
Definition: LongUnion.h:63
LongUnion::UWords
uint16_t UWords[2]
Definition: LongUnion.h:93
IRsend::sendPulseDistanceWidthData
void sendPulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits)
Sends PulseDistance from data contained in parameter using ProtocolConstants structure for timing etc...
Definition: IRSend.hpp:662
IRsend::sendSAMSUNG
void sendSAMSUNG(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:411
LongUnion::UWord
struct LongUnion::@6 UWord
SAMSUNGLG
@ SAMSUNGLG
Definition: IRProtocol.h:101
decode_results::rawlen
uint_fast8_t rawlen
Definition: IRremoteInt.h:205
IRData::protocol
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
Definition: IRremoteInt.h:163
SAMSUNG48
@ SAMSUNG48
Definition: IRProtocol.h:101
IRrecv::lastDecodedAddress
uint16_t lastDecodedAddress
Definition: IRremoteInt.h:405
IRsend::aCommand
void aCommand
Definition: IRremoteInt.h:617
IRsend::enableIROut
void enableIROut(uint_fast8_t aFrequencyKHz)
Enables IR output.
Definition: IRSend.hpp:1498
LocalDebugLevelEnd.h