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-2024 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 #if defined(DEBUG) && !defined(LOCAL_DEBUG)
36 #define LOCAL_DEBUG
37 #else
38 //#define LOCAL_DEBUG // This enables debug output only for this file
39 #endif
40 
44 //==============================================================================
45 // SSSS AAA MMM SSSS U U N N GGGG
46 // S A A M M M S U U NN N G
47 // SSS AAAAA M M M SSS U U N N N G GG
48 // S A A M M S U U N NN G G
49 // SSSS A A M M SSSS UUU N N GGG
50 //==============================================================================
51 /*
52  * Address=0xFFF1 Command=0x76 Raw-Data=0x8976FFF1
53  +4500,-4400
54  + 600,-1600 + 650,- 500 + 600,- 500 + 650,- 500
55  + 600,-1650 + 600,-1600 + 650,-1600 + 600,-1650
56  + 600,-1600 + 600,-1650 + 600,-1650 + 600,-1600
57  + 600,-1650 + 600,-1650 + 600,-1600 + 600,-1650
58  + 600,- 500 + 650,-1600 + 600,-1650 + 600,- 500
59  + 650,-1600 + 600,-1650 + 600,-1650 + 600,- 500
60  + 600,-1650 + 600,- 500 + 600,- 550 + 600,-1600
61  + 600,- 550 + 600,- 550 + 550,- 550 + 600,-1650
62  + 550
63  Sum: 68750
64  */
65 /*
66  * Samsung repeat frame can be the original frame again or a special short repeat frame,
67  * then we call the protocol SamsungLG. They differ only in the handling of repeat,
68  * so we can not decide for the first frame which protocol is used.
69  */
70 // see http://www.hifi-remote.com/wiki/index.php?title=DecodeIR#Samsung
71 // https://www.mikrocontroller.net/articles/IRMP_-_english#SAMSUNG32
72 // https://www.mikrocontroller.net/articles/IRMP_-_english#SAMSUNG48
73 // LSB first, 1 start bit + 16 bit address + 16 or 32 bit data + 1 stop bit.
74 // Here https://forum.arduino.cc/t/klimaanlage-per-ir-steuern/1051381/10 the address (0xB24D) is also 8 bits and then 8 inverted bits
75 //
76 // Here https://github.com/flipperdevices/flipperzero-firmware/blob/master/lib/infrared/encoder_decoder/samsung/infrared_decoder_samsung.c#L18
77 // Address is 8 bit + same 8 bit if data is 8 bit and ~8 bit.
78 //
79 // 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
80 // IRP notation: {38k,5553}<1,-1|1,-3>(8,-8,D:8,S:8,F:16,1,^110)+ ==> 16 bit data - still Samsung32
81 // 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
82 //
83 #define SAMSUNG_ADDRESS_BITS 16
84 #define SAMSUNG_COMMAND16_BITS 16
85 #define SAMSUNG_COMMAND32_BITS 32
86 #define SAMSUNG_BITS (SAMSUNG_ADDRESS_BITS + SAMSUNG_COMMAND16_BITS)
87 #define SAMSUNG48_BITS (SAMSUNG_ADDRESS_BITS + SAMSUNG_COMMAND32_BITS)
88 
89 // except SAMSUNG_HEADER_MARK, values are like NEC
90 #define SAMSUNG_UNIT 560 // 21.28 periods of 38 kHz, 11.2 ticks TICKS_LOW = 8.358 TICKS_HIGH = 15.0
91 #define SAMSUNG_HEADER_MARK (8 * SAMSUNG_UNIT) // 4500 | 180 periods
92 #define SAMSUNG_HEADER_SPACE (8 * SAMSUNG_UNIT) // 4500
93 #define SAMSUNG_BIT_MARK SAMSUNG_UNIT
94 #define SAMSUNG_ONE_SPACE (3 * SAMSUNG_UNIT) // 1690 | 33.8 TICKS_LOW = 25.07 TICKS_HIGH = 45.0
95 #define SAMSUNG_ZERO_SPACE SAMSUNG_UNIT
96 
97 #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
98 #define SAMSUNG_REPEAT_DURATION (SAMSUNG_HEADER_MARK + SAMSUNG_HEADER_SPACE + SAMSUNG_BIT_MARK + SAMSUNG_ZERO_SPACE + SAMSUNG_BIT_MARK)
99 #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.
100 #define SAMSUNG_MAXIMUM_REPEAT_DISTANCE (SAMSUNG_REPEAT_PERIOD + (SAMSUNG_REPEAT_PERIOD / 4)) // 137000 - Just a guess
101 
105 
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 aNumberOfRepeats If < 0 then only a special repeat frame will be sent
144  */
145 void IRsend::sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
146  if (aNumberOfRepeats < 0) {
148  return;
149  }
150 
151  // send 16 bit address and 8 command bits and then 8 inverted command bits LSB first
152  LongUnion tRawData;
153  tRawData.UWord.LowWord = aAddress;
154  tRawData.UByte.MidHighByte = aCommand;
155  tRawData.UByte.HighByte = ~aCommand;
156 
158 }
159 
167 void IRsend::sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
168 
169  LongUnion tSendValue;
170  if (aAddress < 0x100) {
171  // This makes it flipper IRDB compatible
172  // https://github.com/flipperdevices/flipperzero-firmware/blob/master/lib/infrared/encoder_decoder/samsung/infrared_decoder_samsung.c#L18
173  // Duplicate address byte, if data is 8 bit and 8 bit inverted and address is 8bit
174  tSendValue.UBytes[1] = aAddress;
175  tSendValue.UBytes[0] = aAddress;
176  } else {
177  tSendValue.UWords[0] = aAddress;
178  }
179 
180  if (aCommand < 0x100) {
181  // Send 8 command bits and then 8 inverted command bits LSB first
182  tSendValue.UBytes[2] = aCommand;
183  tSendValue.UBytes[3] = ~aCommand;
184 
185  } else {
186  // Send 16 command bits
187  tSendValue.UWords[1] = aCommand;
188  }
189 
191 }
192 
198 void IRsend::sendSamsung16BitAddressAndCommand(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
199 
200  LongUnion tSendValue;
201  // send 16 bit address
202  tSendValue.UWords[0] = aAddress;
203  // Send 16 command bits
204  tSendValue.UWords[1] = aCommand;
205 
207 }
208 
213 void IRsend::sendSamsung48(uint16_t aAddress, uint32_t aCommand, int_fast8_t aNumberOfRepeats) {
214 
215  // send 16 bit address and 2 x ( 8 command bits and then 8 inverted command bits) LSB first
216 #if __INT_WIDTH__ < 32
217  uint32_t tRawSamsungData[2]; // prepare 2 long for Samsung48
218 
219  LongUnion tSendValue;
220  tSendValue.UWords[0] = aAddress;
221  tSendValue.UBytes[2] = aCommand;
222  tSendValue.UBytes[3] = ~aCommand;
223  uint8_t tUpper8BitsOfCommand = aCommand >> 8;
224  tRawSamsungData[1] = tUpper8BitsOfCommand | (~tUpper8BitsOfCommand) << 8;
225  tRawSamsungData[0] = tSendValue.ULong;
226 
228 #else
229  LongLongUnion tSendValue;
230  tSendValue.UWords[0] = aAddress;
231  if (aCommand < 0x10000) {
232  tSendValue.UBytes[2] = aCommand;
233  tSendValue.UBytes[3] = ~aCommand;
234  uint8_t tUpper8BitsOfCommand = aCommand >> 8;
235  tSendValue.UBytes[4] = tUpper8BitsOfCommand;
236  tSendValue.UBytes[5] = ~tUpper8BitsOfCommand;
237  } else {
238  tSendValue.ULongLong = aAddress | aCommand << 16;
239  }
241 #endif
242 }
243 
245 
246  // Check we have enough data (68). The +4 is for initial gap, start bit mark and space + stop bit mark
247  if (decodedIRData.rawlen != ((2 * SAMSUNG_BITS) + 4) && decodedIRData.rawlen != ((2 * SAMSUNG48_BITS) + 4)
248  && (decodedIRData.rawlen != 6)) {
249  IR_DEBUG_PRINT(F("Samsung: "));
250  IR_DEBUG_PRINT(F("Data length="));
252  IR_DEBUG_PRINTLN(F(" is not 6 or 68 or 100"));
253  return false;
254  }
255 
257  return false;
258  }
259 
260  // Check for SansungLG style repeat
261  if (decodedIRData.rawlen == 6) {
266  return true;
267  }
268 
269  /*
270  * Decode first 32 bits
271  */
273 #if defined(LOCAL_DEBUG)
274  Serial.print(F("Samsung: "));
275  Serial.println(F("Decode failed"));
276 #endif
277  return false;
278  }
279  LongUnion tValue;
282 
283  if (decodedIRData.rawlen == (2 * SAMSUNG48_BITS) + 4) {
284  /*
285  * Samsung48
286  */
287  // decode additional 16 bit
289  3 + (2 * SAMSUNG_BITS))) {
290 #if defined(LOCAL_DEBUG)
291  Serial.print(F("Samsung: "));
292  Serial.println(F("Decode failed"));
293 #endif
294  return false;
295  }
296 
297  /*
298  * LSB data is already in tValue.UWord.HighWord!
299  * Put latest (MSB) bits in LowWord, LSB first would have them expect in HighWord so keep this in mind for decoding below
300  */
301  tValue.UWord.LowWord = decodedIRData.decodedRawData; // We have only 16 bit in decodedRawData here
302 #if __INT_WIDTH__ >= 32
303  // workaround until complete refactoring for 64 bit
304  decodedIRData.decodedRawData = (decodedIRData.decodedRawData << 32)| tValue.UWord.HighWord << 16 | decodedIRData.address; // store all 48 bits in decodedRawData
305 #endif
306 
307  /*
308  * Check parity of 32 bit command
309  */
310  // receive 2 * (8 bits then 8 inverted bits) LSB first
311  if (tValue.UByte.MidHighByte != (uint8_t)(~tValue.UByte.HighByte)
312  && tValue.UByte.LowByte != (uint8_t)(~tValue.UByte.MidLowByte)) {
314  }
315 
316  decodedIRData.command = tValue.UByte.LowByte << 8 | tValue.UByte.MidHighByte; // low and high word are swapped here, so fetch it this way
319 
320  } else {
321  /*
322  * Samsung32
323  */
324  if (tValue.UByte.MidHighByte == (uint8_t)(~tValue.UByte.HighByte)) {
325  // 8 bit command (and address) protocol
326  decodedIRData.command = tValue.UByte.MidHighByte; // first 8 bit
327  decodedIRData.address = tValue.UByte.MidLowByte; // assume LowByte == MidLowByte
328  } else {
329  // 16 bit command protocol
330  decodedIRData.command = tValue.UWord.HighWord; // first 16 bit
331  }
334  }
335 
336  // check for repeat
338 
339  return true;
340 }
341 
342 // Old version with MSB first
344  unsigned int offset = 1; // Skip first space
345 
346  // Initial mark
347  if (!matchMark(aResults->rawbuf[offset], SAMSUNG_HEADER_MARK)) {
348  return false;
349  }
350  offset++;
351 
352  // Check for repeat -- like a NEC repeat
353  if ((aResults->rawlen == 4) && matchSpace(aResults->rawbuf[offset], 2250)
354  && matchMark(aResults->rawbuf[offset + 1], SAMSUNG_BIT_MARK)) {
355  aResults->bits = 0;
356  aResults->value = 0xFFFFFFFF;
359  return true;
360  }
361  if (aResults->rawlen < (2 * SAMSUNG_BITS) + 4) {
362  return false;
363  }
364 
365  // Initial space
366  if (!matchSpace(aResults->rawbuf[offset], SAMSUNG_HEADER_SPACE)) {
367  return false;
368  }
369  offset++;
370 
373  return false;
374  }
375 
376  // Success
377  aResults->value = decodedIRData.decodedRawData;
378  aResults->bits = SAMSUNG_BITS;
379  aResults->decode_type = SAMSUNG;
381  return true;
382 }
383 
384 // Old version with MSB first
385 void IRsend::sendSAMSUNG(unsigned long data, int nbits) {
386  // Set IR carrier frequency
388 
389  // Header
392 
393  // Old version with MSB first Data + stop bit
396 }
397 
399 #if defined(LOCAL_DEBUG)
400 #undef LOCAL_DEBUG
401 #endif
402 #endif // _IR_SAMSUNG_HPP
IRData::address
uint16_t address
Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << ...
Definition: IRProtocol.h:109
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:249
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:92
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:159
decode_results::rawbuf
uint16_t * rawbuf
Definition: IRremoteInt.h:170
PROTOCOL_IS_MSB_FIRST
#define PROTOCOL_IS_MSB_FIRST
Definition: IRProtocol.h:145
IRData::numberOfBits
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
Definition: IRProtocol.h:118
IRsend::aNumberOfRepeats
void int_fast8_t aNumberOfRepeats
Definition: IRremoteInt.h:520
MICROS_IN_ONE_MILLI
#define MICROS_IN_ONE_MILLI
Definition: IRremote.hpp:254
LongUnion::UByte
struct LongUnion::@4 UByte
SamsungProtocolConstants
struct PulseDistanceWidthProtocolConstants SamsungProtocolConstants
Definition: ir_Samsung.hpp:102
IRsend::mark
void mark(uint16_t aMarkMicros)
Sends an IR mark for the specified number of microseconds.
Definition: IRSend.hpp:969
IRsend::sendSamsungLGRepeat
void sendSamsungLGRepeat()
Send repeat Repeat commands should be sent in a 110 ms raster.
Definition: ir_Samsung.hpp:118
IRData::rawlen
uint_fast8_t rawlen
counter of entries in rawbuf
Definition: IRProtocol.h:123
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:213
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:91
LongUnion::UBytes
uint8_t UBytes[4]
Definition: LongUnion.h:91
IRsend::sendPulseDistanceWidth
void sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Sends PulseDistance frames and repeats and enables receiver again.
Definition: IRSend.hpp:702
SAMSUNG
@ SAMSUNG
Definition: IRProtocol.h:60
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:165
decode_results::decode_type
decode_type_t decode_type
Definition: IRremoteInt.h:162
IRData::decodedRawData
IRRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send functions.
Definition: IRProtocol.h:112
IRrecv::checkForRepeatSpaceTicksAndSetFlag
void checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks)
Definition: IRReceive.hpp:1042
IR_DEBUG_PRINT
#define IR_DEBUG_PRINT(...)
If DEBUG, print the arguments, otherwise do nothing.
Definition: IRremoteInt.h:137
LongUnion::LowWord
uint16_t LowWord
Definition: LongUnion.h:80
SAMSUNG_BITS
#define SAMSUNG_BITS
Definition: ir_Samsung.hpp:86
matchSpace
bool matchSpace(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for spaces shortened by demodulator hardware.
Definition: IRReceive.hpp:1116
LongLongUnion
Union to specify parts / manifestations of a 64 bit LongLong without casts and shifts.
Definition: LongUnion.h:107
IRrecv::decodePulseDistanceWidthData
bool decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
Definition: IRReceive.hpp:845
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:167
IRDATA_FLAGS_PARITY_FAILED
#define IRDATA_FLAGS_PARITY_FAILED
The current (autorepeat) frame violated parity check.
Definition: IRProtocol.h:93
decode_results::value
uint32_t value
Definition: IRremoteInt.h:164
LongUnion::MidLowByte
uint8_t MidLowByte
Definition: LongUnion.h:62
IRrecv::decodeSAMSUNG
bool decodeSAMSUNG(decode_results *aResults)
Definition: ir_Samsung.hpp:343
PulseDistanceWidthProtocolConstants
Definition: IRProtocol.h:132
LongUnion::HighWord
uint16_t HighWord
Definition: LongUnion.h:81
IRrecv::decodedIRData
IRData decodedIRData
Definition: IRremoteInt.h:321
SAMSUNG_KHZ
#define SAMSUNG_KHZ
Definition: IRProtocol.h:163
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:198
IRrecv::decodeSamsung
bool decodeSamsung()
Definition: ir_Samsung.hpp:244
IRData::flags
uint8_t flags
IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above.
Definition: IRProtocol.h:119
IRsend::sendSamsungLG
void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Samsung.hpp:145
PROTOCOL_IS_LSB_FIRST
#define PROTOCOL_IS_LSB_FIRST
Definition: IRProtocol.h:146
SAMSUNG_BIT_MARK
#define SAMSUNG_BIT_MARK
Definition: ir_Samsung.hpp:93
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:97
sendSamsungLGSpecialRepeat
void sendSamsungLGSpecialRepeat()
Like above, but implemented as a static function Used for sending special repeat frame.
Definition: ir_Samsung.hpp:132
IRrecv::checkHeader
bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants)
Definition: IRReceive.hpp:1018
IRData::command
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
Definition: IRProtocol.h:110
SAMSUNG_MAXIMUM_REPEAT_DISTANCE
#define SAMSUNG_MAXIMUM_REPEAT_DISTANCE
Definition: ir_Samsung.hpp:100
SAMSUNG_COMMAND16_BITS
#define SAMSUNG_COMMAND16_BITS
Definition: ir_Samsung.hpp:84
SAMSUNG_ZERO_SPACE
#define SAMSUNG_ZERO_SPACE
Definition: ir_Samsung.hpp:95
matchMark
bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
Definition: IRReceive.hpp:1083
LongUnion::ULong
uint32_t ULong
Definition: LongUnion.h:95
IrSender
IRsend IrSender
Definition: IRSend.hpp:65
SAMSUNG48_BITS
#define SAMSUNG48_BITS
Definition: ir_Samsung.hpp:87
IRrecv::lastDecodedCommand
uint32_t lastDecodedCommand
Definition: IRremoteInt.h:326
IRDATA_FLAGS_IS_LSB_FIRST
#define IRDATA_FLAGS_IS_LSB_FIRST
Definition: IRProtocol.h:100
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:99
SAMSUNG_HEADER_MARK
#define SAMSUNG_HEADER_MARK
Definition: ir_Samsung.hpp:91
IRsend::space
static void space(uint16_t aSpaceMicros)
Sends an IR space for the specified number of microseconds.
Definition: IRSend.hpp:1165
SAMSUNG_COMMAND32_BITS
#define SAMSUNG_COMMAND32_BITS
Definition: ir_Samsung.hpp:85
SAMSUNG_ONE_SPACE
#define SAMSUNG_ONE_SPACE
Definition: ir_Samsung.hpp:94
LongUnion::MidHighByte
uint8_t MidHighByte
Definition: LongUnion.h:63
LongUnion::UWords
uint16_t UWords[2]
Definition: LongUnion.h:93
IRsend::sendSAMSUNG
void sendSAMSUNG(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:385
LongUnion::UWord
struct LongUnion::@6 UWord
IRsend::sendPulseDistanceWidthFromArray
void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros, uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, IRRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats)
Definition: IRSend.hpp:549
SamsungLGProtocolConstants
struct PulseDistanceWidthProtocolConstants SamsungLGProtocolConstants
Definition: ir_Samsung.hpp:106
IRsend::sendPulseDistanceWidthData
void sendPulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits)
Sends PulseDistance data The output always ends with a space Each additional call costs 16 bytes prog...
Definition: IRSend.hpp:832
IRrecv::lastDecodedAddress
uint32_t lastDecodedAddress
Definition: IRremoteInt.h:325
IR_DEBUG_PRINTLN
#define IR_DEBUG_PRINTLN(...)
If DEBUG, print the arguments as a line, otherwise do nothing.
Definition: IRremoteInt.h:141
SAMSUNGLG
@ SAMSUNGLG
Definition: IRProtocol.h:61
decode_results::rawlen
uint_fast8_t rawlen
Definition: IRremoteInt.h:171
IRData::protocol
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
Definition: IRProtocol.h:108
SAMSUNG48
@ SAMSUNG48
Definition: IRProtocol.h:62
IRsend::aCommand
void aCommand
Definition: IRremoteInt.h:582
IRsend::enableIROut
void enableIROut(uint_fast8_t aFrequencyKHz)
Enables IR output.
Definition: IRSend.hpp:1205