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-2022 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 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 // 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
76 // IRP notation: {38k,5553}<1,-1|1,-3>(8,-8,D:8,S:8,F:16,1,^110)+ ==> 16 bit data - still Samsung32
77 // 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
78 //
79 #define SAMSUNG_ADDRESS_BITS 16
80 #define SAMSUNG_COMMAND16_BITS 16
81 #define SAMSUNG_COMMAND32_BITS 32
82 #define SAMSUNG_BITS (SAMSUNG_ADDRESS_BITS + SAMSUNG_COMMAND16_BITS)
83 #define SAMSUNG48_BITS (SAMSUNG_ADDRESS_BITS + SAMSUNG_COMMAND32_BITS)
84 
85 // except SAMSUNG_HEADER_MARK, values are like NEC
86 #define SAMSUNG_UNIT 560 // 21.28 periods of 38 kHz, 11.2 ticks TICKS_LOW = 8.358 TICKS_HIGH = 15.0
87 #define SAMSUNG_HEADER_MARK (8 * SAMSUNG_UNIT) // 4500 | 180
88 #define SAMSUNG_HEADER_SPACE (8 * SAMSUNG_UNIT) // 4500
89 #define SAMSUNG_BIT_MARK SAMSUNG_UNIT
90 #define SAMSUNG_ONE_SPACE (3 * SAMSUNG_UNIT) // 1690 | 33.8 TICKS_LOW = 25.07 TICKS_HIGH = 45.0
91 #define SAMSUNG_ZERO_SPACE SAMSUNG_UNIT
92 
93 #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
94 #define SAMSUNG_REPEAT_DURATION (SAMSUNG_HEADER_MARK + SAMSUNG_HEADER_SPACE + SAMSUNG_BIT_MARK + SAMSUNG_ZERO_SPACE + SAMSUNG_BIT_MARK)
95 #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.
96 #define SAMSUNG_REPEAT_DISTANCE (SAMSUNG_REPEAT_PERIOD - SAMSUNG_AVERAGE_DURATION)
97 
101 
102 /************************************
103  * Start of send and decode functions
104  ************************************/
105 
112  enableIROut (SAMSUNG_KHZ); // 38 kHz
113  mark(SAMSUNG_HEADER_MARK); // + 4500
114  space(SAMSUNG_HEADER_SPACE); // - 4500
115  mark(SAMSUNG_BIT_MARK); // + 560
116  space(SAMSUNG_ZERO_SPACE); // - 560
117  mark(SAMSUNG_BIT_MARK); // + 560
118 #if !defined(DISABLE_CODE_FOR_RECEIVER)
120 #endif
121 }
122 
128  IrSender.enableIROut(SAMSUNG_KHZ); // 38 kHz
129  IrSender.mark(SAMSUNG_HEADER_MARK); // + 4500
131  IrSender.mark(SAMSUNG_BIT_MARK); // + 560
133  IrSender.mark(SAMSUNG_BIT_MARK); // + 560
134 #if !defined(DISABLE_CODE_FOR_RECEIVER)
136 #endif
137 }
138 
139 /*
140  * Sent e.g. by an LG 6711R1P071A remote
141  * @param aNumberOfRepeats If < 0 then only a special repeat frame will be sent
142  */
143 void IRsend::sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
144  if (aNumberOfRepeats < 0) {
146  return;
147  }
148 
149  // send 16 bit address and 8 command bits and then 8 inverted command bits LSB first
150  LongUnion tRawData;
151  tRawData.UWord.LowWord = aAddress;
152  tRawData.UByte.MidHighByte = aCommand;
153  tRawData.UByte.HighByte = ~aCommand;
154 
156 }
157 
162 void IRsend::sendSamsung(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
163 
164  // send 16 bit address and 8 command bits and then 8 inverted command bits LSB first
165  LongUnion tSendValue;
166  tSendValue.UWords[0] = aAddress;
167  if (aCommand < 0x100) {
168  tSendValue.UBytes[2] = aCommand;
169  tSendValue.UBytes[3] = ~aCommand;
170  } else {
171  tSendValue.UWords[1] = aCommand;
172  }
173 
175 }
176 
181 void IRsend::sendSamsung48(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats) {
182 
183  // send 16 bit address and 2 x ( 8 command bits and then 8 inverted command bits) LSB first
184 #if __INT_WIDTH__ < 32
185  uint32_t tRawSamsungData[2]; // prepare 2 long for Samsung48
186 
187  LongUnion tSendValue;
188  tSendValue.UWords[0] = aAddress;
189  tSendValue.UBytes[2] = aCommand;
190  tSendValue.UBytes[3] = ~aCommand;
191  uint8_t tUpper8BitsOfCommand = aCommand >> 8;
192  tRawSamsungData[1] = tUpper8BitsOfCommand | (~tUpper8BitsOfCommand) << 8;
193  tRawSamsungData[0] = tSendValue.ULong;
194 
196 #else
197  LongLongUnion tSendValue;
198  tSendValue.UWords[0] = aAddress;
199  if (aCommand < 0x10000) {
200  tSendValue.UBytes[2] = aCommand;
201  tSendValue.UBytes[3] = ~aCommand;
202  uint8_t tUpper8BitsOfCommand = aCommand >> 8;
203  tSendValue.UBytes[4] = tUpper8BitsOfCommand;
204  tSendValue.UBytes[5] = ~tUpper8BitsOfCommand;
205  } else {
206  tSendValue.ULongLong = aAddress | aCommand << 16;
207  }
209 #endif
210 }
211 
213 
214  // Check we have enough data (68). The +4 is for initial gap, start bit mark and space + stop bit mark
215  if (decodedIRData.rawDataPtr->rawlen != ((2 * SAMSUNG_BITS) + 4)
217  IR_DEBUG_PRINT(F("Samsung: "));
218  IR_DEBUG_PRINT(F("Data length="));
220  IR_DEBUG_PRINTLN(F(" is not 6 or 68 or 100"));
221  return false;
222  }
223 
225  return false;
226  }
227 
228  // Check for SansungLG style repeat
229  if (decodedIRData.rawDataPtr->rawlen == 6) {
234  return true;
235  }
236 
237  /*
238  * Decode first 32 bits
239  */
241 #if defined(LOCAL_DEBUG)
242  Serial.print(F("Samsung: "));
243  Serial.println(F("Decode failed"));
244 #endif
245  return false;
246  }
247  LongUnion tValue;
250 
251  if (decodedIRData.rawDataPtr->rawlen == (2 * SAMSUNG48_BITS) + 4) {
252  /*
253  * Samsung48
254  */
255  // decode additional 16 bit
257  3 + (2 * SAMSUNG_BITS))) {
258 #if defined(LOCAL_DEBUG)
259  Serial.print(F("Samsung: "));
260  Serial.println(F("Decode failed"));
261 #endif
262  return false;
263  }
264 
265  /*
266  * LSB data is already in tValue.UWord.HighWord!
267  * Put latest (MSB) bits in LowWord, LSB first would have them expect in HighWord so keep this in mind for decoding below
268  */
269  tValue.UWord.LowWord = decodedIRData.decodedRawData; // We have only 16 bit in decodedRawData here
270 #if __INT_WIDTH__ >= 32
271  // workaround until complete refactoring for 64 bit
272  decodedIRData.decodedRawData = (decodedIRData.decodedRawData << 32)| tValue.UWord.HighWord << 16 | decodedIRData.address; // store all 48 bits in decodedRawData
273 #endif
274 
275  /*
276  * Check parity of 32 bit command
277  */
278  // receive 2 * (8 bits then 8 inverted bits) LSB first
279  if (tValue.UByte.MidHighByte != (uint8_t)(~tValue.UByte.HighByte)
280  && tValue.UByte.LowByte != (uint8_t)(~tValue.UByte.MidLowByte)) {
282  }
283 
284  decodedIRData.command = tValue.UByte.LowByte << 8 | tValue.UByte.MidHighByte; // low and high word are swapped here, so fetch it this way
287 
288  } else {
289  /*
290  * Samsung32
291  */
292  if (tValue.UByte.MidHighByte == (uint8_t)(~tValue.UByte.HighByte)) {
293  // 8 bit command protocol
294  decodedIRData.command = tValue.UByte.MidHighByte; // first 8 bit
295  } else {
296  // 16 bit command protocol
297  decodedIRData.command = tValue.UWord.HighWord; // first 16 bit
298  }
301  }
302 
303  // check for repeat
305 
306  return true;
307 }
308 
309 // Old version with MSB first
311  unsigned int offset = 1; // Skip first space
312 
313  // Initial mark
314  if (!matchMark(aResults->rawbuf[offset], SAMSUNG_HEADER_MARK)) {
315  return false;
316  }
317  offset++;
318 
319  // Check for repeat -- like a NEC repeat
320  if ((aResults->rawlen == 4) && matchSpace(aResults->rawbuf[offset], 2250)
321  && matchMark(aResults->rawbuf[offset + 1], SAMSUNG_BIT_MARK)) {
322  aResults->bits = 0;
323  aResults->value = 0xFFFFFFFF;
326  return true;
327  }
328  if (aResults->rawlen < (2 * SAMSUNG_BITS) + 4) {
329  return false;
330  }
331 
332  // Initial space
333  if (!matchSpace(aResults->rawbuf[offset], SAMSUNG_HEADER_SPACE)) {
334  return false;
335  }
336  offset++;
337 
340  return false;
341  }
342 
343  // Success
344  aResults->value = decodedIRData.decodedRawData;
345  aResults->bits = SAMSUNG_BITS;
346  aResults->decode_type = SAMSUNG;
348  return true;
349 }
350 
351 // Old version with MSB first
352 void IRsend::sendSAMSUNG(unsigned long data, int nbits) {
353  // Set IR carrier frequency
355 
356  // Header
359 
360  // Old version with MSB first Data + stop bit
363 #if !defined(DISABLE_CODE_FOR_RECEIVER)
365 #endif
366 }
367 
369 #if defined(LOCAL_DEBUG)
370 #undef LOCAL_DEBUG
371 #endif
372 #endif // _IR_SAMSUNG_HPP
IRData::address
uint16_t address
Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << ...
Definition: IRProtocol.h:117
LongLongUnion::UBytes
uint8_t UBytes[8]
Definition: LongUnion.h:135
LongUnion
Union to specify parts / manifestations of a 32 bit Long without casts and shifts.
Definition: LongUnion.h:57
SAMSUNG_HEADER_SPACE
#define SAMSUNG_HEADER_SPACE
Definition: ir_Samsung.hpp:88
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:155
SAMSUNG_REPEAT_DISTANCE
#define SAMSUNG_REPEAT_DISTANCE
Definition: ir_Samsung.hpp:96
PROTOCOL_IS_MSB_FIRST
#define PROTOCOL_IS_MSB_FIRST
Definition: IRProtocol.h:130
IRData::numberOfBits
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
Definition: IRProtocol.h:120
IRsend::aNumberOfRepeats
void uint8_t int_fast8_t aNumberOfRepeats
Definition: IRremoteInt.h:474
MICROS_IN_ONE_MILLI
#define MICROS_IN_ONE_MILLI
Definition: IRremote.hpp:263
LongUnion::UByte
struct LongUnion::@4 UByte
SamsungProtocolConstants
struct PulseDistanceWidthProtocolConstants SamsungProtocolConstants
Definition: ir_Samsung.hpp:98
IRsend::mark
void mark(unsigned int aMarkMicros)
Sends an IR mark for the specified number of microseconds.
Definition: IRSend.hpp:757
IRsend::sendSamsungLGRepeat
void sendSamsungLGRepeat()
Send repeat Repeat commands should be sent in a 110 ms raster.
Definition: ir_Samsung.hpp:111
IRDATA_FLAGS_IS_REPEAT
#define IRDATA_FLAGS_IS_REPEAT
Definition: IRProtocol.h:94
LongUnion::UBytes
uint8_t UBytes[4]
Definition: LongUnion.h:89
IRrecv::restartAfterSend
void restartAfterSend()
Restarts receiver after send.
Definition: IRReceive.hpp:346
IRsend::sendPulseDistanceWidth
void sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Sends PulseDistance frames and repeats.
Definition: IRSend.hpp:532
SAMSUNG
@ SAMSUNG
Definition: IRProtocol.h:60
LongUnion::LowByte
uint8_t LowByte
Definition: LongUnion.h:59
LongUnion::HighByte
uint8_t HighByte
Definition: LongUnion.h:62
decode_results::rawbuf
unsigned int * rawbuf
Definition: IRremoteInt.h:166
IRData::rawDataPtr
irparams_struct * rawDataPtr
Pointer of the raw timing data to be decoded. Mainly the OverflowFlag and the data buffer filled by r...
Definition: IRProtocol.h:126
decode_results::bits
uint8_t bits
Definition: IRremoteInt.h:161
decode_results::decode_type
decode_type_t decode_type
Definition: IRremoteInt.h:158
IRData::decodedRawData
IRRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send functions.
Definition: IRProtocol.h:122
IR_DEBUG_PRINT
#define IR_DEBUG_PRINT(...)
If DEBUG, print the arguments, otherwise do nothing.
Definition: IRremoteInt.h:133
LongUnion::LowWord
uint16_t LowWord
Definition: LongUnion.h:78
SAMSUNG_BITS
#define SAMSUNG_BITS
Definition: ir_Samsung.hpp:82
irparams_struct::rawlen
uint_fast8_t rawlen
counter of entries in rawbuf
Definition: IRremoteInt.h:109
LongLongUnion
Union to specify parts / manifestations of a 64 bit LongLong without casts and shifts.
Definition: LongUnion.h:104
IRrecv::decodePulseDistanceWidthData
bool decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
Definition: IRReceive.hpp:768
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.
Definition: ir_Samsung.hpp:162
IRDATA_FLAGS_PARITY_FAILED
#define IRDATA_FLAGS_PARITY_FAILED
the current (autorepeat) frame violated parity check
Definition: IRProtocol.h:96
decode_results::value
uint32_t value
Definition: IRremoteInt.h:160
LongUnion::MidLowByte
uint8_t MidLowByte
Definition: LongUnion.h:60
IRrecv::decodeSAMSUNG
bool decodeSAMSUNG(decode_results *aResults)
Definition: ir_Samsung.hpp:310
PulseDistanceWidthProtocolConstants
Definition: IRProtocol.h:74
SAMSUNG_LG
@ SAMSUNG_LG
Definition: IRProtocol.h:62
LongUnion::HighWord
uint16_t HighWord
Definition: LongUnion.h:79
IRrecv::decodedIRData
IRData decodedIRData
Definition: IRremoteInt.h:305
SAMSUNG_KHZ
#define SAMSUNG_KHZ
Definition: IRProtocol.h:144
matchSpace
bool matchSpace(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros)
Compensate for spaces shortened by demodulator hardware.
Definition: IRReceive.hpp:1033
IRsend::sendPulseDistanceWidthFromArray
void sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, unsigned int aHeaderMarkMicros, unsigned int aHeaderSpaceMicros, unsigned int aOneMarkMicros, unsigned int aOneSpaceMicros, unsigned int aZeroMarkMicros, unsigned int aZeroSpaceMicros, IRRawDataType *aDecodedRawDataArray, unsigned int aNumberOfBits, bool aMSBfirst, bool aSendStopBit, unsigned int aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats)
Sends PulseDistance data from array For LSB First the LSB of array[0] is sent first then all bits unt...
Definition: IRSend.hpp:383
SEND_STOP_BIT
#define SEND_STOP_BIT
Definition: IRremoteInt.h:393
IRrecv::decodeSamsung
bool decodeSamsung()
Definition: ir_Samsung.hpp:212
IRData::flags
uint8_t flags
See IRDATA_FLAGS_* definitions above.
Definition: IRProtocol.h:121
IRsend::sendSamsungLG
void sendSamsungLG(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Definition: ir_Samsung.hpp:143
PROTOCOL_IS_LSB_FIRST
#define PROTOCOL_IS_LSB_FIRST
Definition: IRProtocol.h:129
SAMSUNG_BIT_MARK
#define SAMSUNG_BIT_MARK
Definition: ir_Samsung.hpp:89
sendSamsungLGSpecialRepeat
void sendSamsungLGSpecialRepeat()
Static function for sending special repeat frame.
Definition: ir_Samsung.hpp:127
IRrecv::checkForRepeatSpaceAndSetFlag
void checkForRepeatSpaceAndSetFlag(unsigned int aMediumRepeatSpaceMicros)
Definition: IRReceive.hpp:962
IRrecv::checkHeader
bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants)
Definition: IRReceive.hpp:943
IRData::command
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
Definition: IRProtocol.h:118
SAMSUNG_COMMAND16_BITS
#define SAMSUNG_COMMAND16_BITS
Definition: ir_Samsung.hpp:80
SAMSUNG_ZERO_SPACE
#define SAMSUNG_ZERO_SPACE
Definition: ir_Samsung.hpp:91
LongUnion::ULong
uint32_t ULong
Definition: LongUnion.h:93
IrSender
IRsend IrSender
Definition: IRSend.hpp:59
SAMSUNG48_BITS
#define SAMSUNG48_BITS
Definition: ir_Samsung.hpp:83
IRrecv::lastDecodedCommand
uint32_t lastDecodedCommand
Definition: IRremoteInt.h:310
IRsend::space
static void space(unsigned int aSpaceMicros)
Sends an IR space for the specified number of microseconds.
Definition: IRSend.hpp:927
IRDATA_FLAGS_IS_LSB_FIRST
#define IRDATA_FLAGS_IS_LSB_FIRST
Definition: IRProtocol.h:101
LongLongUnion::UWords
uint16_t UWords[4]
Definition: LongUnion.h:137
LongLongUnion::ULongLong
uint64_t ULongLong
Definition: LongUnion.h:139
SAMSUNG_REPEAT_PERIOD
#define SAMSUNG_REPEAT_PERIOD
Definition: ir_Samsung.hpp:95
SAMSUNG_HEADER_MARK
#define SAMSUNG_HEADER_MARK
Definition: ir_Samsung.hpp:87
IRsend::sendSamsung48
void sendSamsung48(uint16_t aAddress, uint16_t aCommand, int_fast8_t aNumberOfRepeats)
Here we send Samsung48 We send 2 x (8 bit command and then ~command)
Definition: ir_Samsung.hpp:181
SAMSUNG_COMMAND32_BITS
#define SAMSUNG_COMMAND32_BITS
Definition: ir_Samsung.hpp:81
SAMSUNG_ONE_SPACE
#define SAMSUNG_ONE_SPACE
Definition: ir_Samsung.hpp:90
LongUnion::MidHighByte
uint8_t MidHighByte
Definition: LongUnion.h:61
LongUnion::UWords
uint16_t UWords[2]
Definition: LongUnion.h:91
IRsend::sendSAMSUNG
void sendSAMSUNG(unsigned long data, int nbits)
Definition: ir_Samsung.hpp:352
LongUnion::UWord
struct LongUnion::@6 UWord
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:643
IRrecv::lastDecodedAddress
uint32_t lastDecodedAddress
Definition: IRremoteInt.h:309
IR_DEBUG_PRINTLN
#define IR_DEBUG_PRINTLN(...)
If DEBUG, print the arguments as a line, otherwise do nothing.
Definition: IRremoteInt.h:137
matchMark
bool matchMark(unsigned int aMeasuredTicks, unsigned int aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
Definition: IRReceive.hpp:1000
decode_results::rawlen
uint_fast8_t rawlen
Definition: IRremoteInt.h:167
IRData::protocol
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
Definition: IRProtocol.h:116
SAMSUNG48
@ SAMSUNG48
Definition: IRProtocol.h:61
if
if(irparams.TickCounterForISR< UINT16_MAX)
Definition: IRReceive.hpp:147
IRsend::aCommand
void uint8_t aCommand
Definition: IRremoteInt.h:474
IrReceiver
IRrecv IrReceiver
The receiver instance.
Definition: IRReceive.hpp:59
IRsend::enableIROut
void enableIROut(uint_fast8_t aFrequencyKHz)
Enables IR output.
Definition: IRSend.hpp:961