49 #if defined(IR_SEND_PIN)
50 #define sendPin IR_SEND_PIN
53 #if !defined(NO_LED_SEND_FEEDBACK_CODE)
54 #define LED_SEND_FEEDBACK_CODE // Resolve the double negative
65 #if !defined(IR_SEND_PIN)
73 #if defined(IR_SEND_PIN)
78 #if defined(_IR_MEASURE_TIMING) && defined(_IR_TIMING_TEST_PIN)
91 #else // defined(IR_SEND_PIN)
114 #if defined(IR_SEND_PIN)
120 #if defined(LED_SEND_FEEDBACK_CODE)
123 (void) aFeedbackLEDPin;
126 #endif // defined(IR_SEND_PIN)
129 void IRsend::begin(uint_fast8_t aSendPin,
bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin) {
130 (void) aEnableLEDFeedback;
131 begin(aSendPin, aFeedbackLEDPin);
148 auto tProtocol = aIRSendData->
protocol;
149 auto tAddress = aIRSendData->
address;
150 auto tCommand = aIRSendData->
command;
190 if (tProtocol ==
NEC) {
193 }
else if (tProtocol ==
SAMSUNG) {
202 }
else if (tProtocol ==
SONY) {
208 }
else if (tProtocol ==
DENON) {
211 }
else if (tProtocol ==
SHARP) {
214 }
else if (tProtocol ==
LG) {
217 }
else if (tProtocol ==
JVC) {
220 }
else if (tProtocol ==
RC5) {
223 }
else if (tProtocol ==
RC6) {
238 }
else if (tProtocol ==
NEC2) {
241 }
else if (tProtocol ==
ONKYO) {
244 }
else if (tProtocol ==
APPLE) {
247 #if !defined(EXCLUDE_EXOTIC_PROTOCOLS)
255 }
else if (tProtocol ==
FAST) {
259 }
else if (tProtocol ==
LEGO_PF) {
314 if (aProtocol ==
NEC) {
317 }
else if (aProtocol ==
SAMSUNG) {
326 }
else if (aProtocol ==
SONY) {
332 }
else if (aProtocol ==
DENON) {
335 }
else if (aProtocol ==
SHARP) {
338 }
else if (aProtocol ==
LG) {
341 }
else if (aProtocol ==
JVC) {
344 }
else if (aProtocol ==
RC5) {
347 }
else if (aProtocol ==
RC6) {
362 }
else if (aProtocol ==
NEC2) {
365 }
else if (aProtocol ==
ONKYO) {
368 }
else if (aProtocol ==
APPLE) {
371 #if !defined(EXCLUDE_EXOTIC_PROTOCOLS)
375 }
else if (aProtocol ==
FAST) {
379 }
else if (aProtocol ==
LEGO_PF) {
400 void IRsend::sendRaw(
const uint16_t aBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz) {
405 DEBUG_PRINT((uint32_t) aBufferWithMicroseconds, HEX);
413 for (uint_fast16_t i = 0; i < aLengthOfBuffer; i++) {
416 space(aBufferWithMicroseconds[i]);
418 mark(aBufferWithMicroseconds[i]);
426 void IRsend::sendRaw(
const uint16_t aBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
427 uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats) {
430 while (tNumberOfCommands > 0) {
431 unsigned long tStartOfFrameMillis = millis();
432 sendRaw(aBufferWithMicroseconds, aLengthOfBuffer, aIRFrequencyKilohertz);
437 if (tNumberOfCommands > 0) {
438 auto tCurrentFrameDurationMillis = millis() - tStartOfFrameMillis;
442 if (aRepeatPeriodMillis > tCurrentFrameDurationMillis) {
443 delay(aRepeatPeriodMillis - tCurrentFrameDurationMillis);
453 void IRsend::sendRaw(
const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz) {
457 for (uint_fast16_t i = 0; i < aLengthOfBuffer; i++) {
466 void IRsend::sendRaw(
const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
467 uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats) {
470 while (tNumberOfCommands > 0) {
471 unsigned long tStartOfFrameMillis = millis();
472 sendRaw(aBufferWithTicks, aLengthOfBuffer, aIRFrequencyKilohertz);
477 if (tNumberOfCommands > 0) {
478 auto tCurrentFrameDurationMillis = millis() - tStartOfFrameMillis;
482 if (aRepeatPeriodMillis > tCurrentFrameDurationMillis) {
483 delay(aRepeatPeriodMillis - tCurrentFrameDurationMillis);
493 void IRsend::sendRaw_P(
const uint16_t aPGMBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer,
494 uint_fast8_t aIRFrequencyKilohertz) {
495 #if !defined(__AVR__)
496 sendRaw(aPGMBufferWithMicroseconds, aLengthOfBuffer, aIRFrequencyKilohertz);
507 for (uint_fast16_t i = 0; i < aLengthOfBuffer; i++) {
508 uint16_t duration = pgm_read_word(&aPGMBufferWithMicroseconds[i]);
523 void IRsend::sendRaw_P(
const uint16_t aPGMBufferWithMicroseconds[], uint_fast16_t aLengthOfBuffer,
524 uint_fast8_t aIRFrequencyKilohertz, uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats) {
527 DEBUG_PRINT((uint32_t) aPGMBufferWithMicroseconds, HEX);
533 while (tNumberOfCommands > 0) {
534 unsigned long tStartOfFrameMillis = millis();
535 sendRaw_P(aPGMBufferWithMicroseconds, aLengthOfBuffer, aIRFrequencyKilohertz);
540 if (tNumberOfCommands > 0) {
541 auto tCurrentFrameDurationMillis = millis() - tStartOfFrameMillis;
545 if (aRepeatPeriodMillis > tCurrentFrameDurationMillis) {
546 delay(aRepeatPeriodMillis - tCurrentFrameDurationMillis);
556 void IRsend::sendRaw_P(
const uint8_t aPGMBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz) {
557 #if !defined(__AVR__)
558 sendRaw(aPGMBufferWithTicks, aLengthOfBuffer, aIRFrequencyKilohertz);
563 for (uint_fast16_t i = 0; i < aLengthOfBuffer; i++) {
564 uint16_t duration = pgm_read_byte(&aPGMBufferWithTicks[i]) *
MICROS_PER_TICK;
577 void IRsend::sendRaw_P(
const uint8_t aPGMBufferWithTicks[], uint_fast16_t aLengthOfBuffer, uint_fast8_t aIRFrequencyKilohertz,
578 uint_fast16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats) {
581 while (tNumberOfCommands > 0) {
582 unsigned long tStartOfFrameMillis = millis();
583 sendRaw_P(aPGMBufferWithTicks, aLengthOfBuffer, aIRFrequencyKilohertz);
588 if (tNumberOfCommands > 0) {
589 auto tCurrentFrameDurationMillis = millis() - tStartOfFrameMillis;
593 if (aRepeatPeriodMillis > tCurrentFrameDurationMillis) {
594 delay(aRepeatPeriodMillis - tCurrentFrameDurationMillis);
612 uint16_t aZeroSpaceMicros,
IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits, uint8_t aFlags) {
621 for (uint_fast8_t i = aNumberOfBits; i > 0; i--) {
624 mark(aOneMarkMicros);
625 space(aOneSpaceMicros);
628 mark(aZeroMarkMicros);
629 space(aZeroSpaceMicros);
645 mark(aOneMarkMicros);
663 uint_fast8_t aNumberOfBits) {
671 uint_fast8_t aNumberOfBits) {
674 memcpy_P(&tTemporaryPulseDistanceWidthProtocolConstants, aProtocolConstantsPGM,
675 sizeof(tTemporaryPulseDistanceWidthProtocolConstants));
694 uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
IRDecodedRawDataType aData,
695 uint_fast8_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats,
696 void (*aSpecialSendRepeatFunction)()) {
699 if (aSpecialSendRepeatFunction !=
nullptr) {
700 aSpecialSendRepeatFunction();
711 while (tNumberOfCommands > 0) {
712 unsigned long tStartOfFrameMillis = millis();
714 if (tNumberOfCommands < ((uint_fast8_t)
aNumberOfRepeats + 1) && aSpecialSendRepeatFunction !=
nullptr) {
716 aSpecialSendRepeatFunction();
719 mark(aHeaderMarkMicros);
720 space(aHeaderSpaceMicros);
727 if (tNumberOfCommands > 0) {
731 auto tFrameDurationMillis = millis() - tStartOfFrameMillis;
732 if (aRepeatPeriodMillis > tFrameDurationMillis) {
733 delay(aRepeatPeriodMillis - tFrameDurationMillis);
740 uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
741 IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
742 int_fast8_t aNumberOfRepeats) {
750 #if defined(LOCAL_DEBUG)
752 Serial.print(F(
"Data[0]=0x"));
753 Serial.print(aDecodedRawDataArray[0], HEX);
754 if (tNumberOf32Or64BitChunks > 1) {
755 Serial.print(F(
" Data[1]=0x"));
756 Serial.print(aDecodedRawDataArray[1], HEX);
758 Serial.print(F(
" #="));
759 Serial.println(aNumberOfBits);
763 while (tNumberOfCommands > 0) {
764 unsigned long tStartOfFrameMillis = millis();
767 mark(aHeaderMarkMicros);
768 space(aHeaderSpaceMicros);
770 for (uint_fast8_t i = 0; i < tNumberOf32Or64BitChunks; ++i) {
771 uint8_t tNumberOfBitsForOneSend;
775 if (i == (tNumberOf32Or64BitChunks - 1)) {
777 tNumberOfBitsForOneSend = aNumberOfBits;
786 tNumberOfBitsForOneSend, tFlags);
792 if (tNumberOfCommands > 0) {
796 auto tFrameDurationMillis = millis() - tStartOfFrameMillis;
797 if (aRepeatPeriodMillis > tFrameDurationMillis) {
798 delay(aRepeatPeriodMillis - tFrameDurationMillis);
805 uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
806 IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
807 int_fast8_t aNumberOfRepeats) {
815 #if defined(LOCAL_DEBUG)
817 Serial.print(F(
"Data[0]=0x"));
818 Serial.print(aDecodedRawDataPGMArray[0], HEX);
819 if (tNumberOf32Or64BitChunks > 1) {
820 Serial.print(F(
" Data[1]=0x"));
821 Serial.print(aDecodedRawDataPGMArray[1], HEX);
823 Serial.print(F(
" #="));
824 Serial.println(aNumberOfBits);
828 while (tNumberOfCommands > 0) {
829 unsigned long tStartOfFrameMillis = millis();
832 mark(aHeaderMarkMicros);
833 space(aHeaderSpaceMicros);
835 for (uint_fast8_t i = 0; i < tNumberOf32Or64BitChunks; ++i) {
836 uint8_t tNumberOfBitsForOneSend;
840 if (i == (tNumberOf32Or64BitChunks - 1)) {
842 tNumberOfBitsForOneSend = aNumberOfBits;
851 #if (__INT_WIDTH__ < 32)
852 tDecodedRawData = pgm_read_dword(&aDecodedRawDataPGMArray[i]);
854 tDecodedRawData = aDecodedRawDataPGMArray[i];
857 tNumberOfBitsForOneSend, tFlags);
863 if (tNumberOfCommands > 0) {
867 auto tFrameDurationMillis = millis() - tStartOfFrameMillis;
868 if (aRepeatPeriodMillis > tFrameDurationMillis) {
869 delay(aRepeatPeriodMillis - tFrameDurationMillis);
887 IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
888 int_fast8_t aNumberOfRepeats) {
892 aDistanceWidthTimingInfo->
ZeroSpaceMicros, aDecodedRawDataArray, aNumberOfBits, aFlags, aRepeatPeriodMillis,
898 uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats) {
901 memcpy_P(&tTemporaryDistanceWidthTimingInfo, aDistanceWidthTimingInfoPGM,
sizeof(tTemporaryDistanceWidthTimingInfo));
918 uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
943 while (tNumberOfCommands > 0) {
944 unsigned long tStartOfFrameMillis = millis();
961 if (tNumberOfCommands > 0) {
962 auto tCurrentFrameDurationMillis = millis() - tStartOfFrameMillis;
983 IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
997 #if defined(LOCAL_DEBUG)
999 Serial.print(F(
"Data[0]=0x"));
1000 Serial.print(aDecodedRawDataArray[0], HEX);
1001 if (tNumberOf32Or64BitChunks > 1) {
1002 Serial.print(F(
" Data[1]=0x"));
1003 Serial.print(aDecodedRawDataArray[1], HEX);
1005 Serial.print(F(
" #="));
1006 Serial.println(aNumberOfBits);
1011 while (tNumberOfCommands > 0) {
1012 auto tStartOfFrameMillis = millis();
1013 auto tNumberOfBits = aNumberOfBits;
1018 uint8_t tOriginalFlags = aProtocolConstants->
Flags;
1020 for (uint_fast8_t i = 0; i < tNumberOf32Or64BitChunks; ++i) {
1021 uint8_t tNumberOfBitsForOneSend;
1024 if (i == (tNumberOf32Or64BitChunks - 1)) {
1026 tNumberOfBitsForOneSend = tNumberOfBits;
1027 tFlags = tOriginalFlags;
1042 tNumberOfCommands--;
1044 if (tNumberOfCommands > 0) {
1048 auto tFrameDurationMillis = millis() - tStartOfFrameMillis;
1057 IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
1071 #if defined(LOCAL_DEBUG)
1073 Serial.print(F(
"Data[0]=0x"));
1074 Serial.print(aDecodedRawDataPGMArray[0], HEX);
1075 if (tNumberOf32Or64BitChunks > 1) {
1076 Serial.print(F(
" Data[1]=0x"));
1077 Serial.print(aDecodedRawDataPGMArray[1], HEX);
1079 Serial.print(F(
" #="));
1080 Serial.println(aNumberOfBits);
1085 while (tNumberOfCommands > 0) {
1086 auto tStartOfFrameMillis = millis();
1087 auto tNumberOfBits = aNumberOfBits;
1092 uint8_t tOriginalFlags = aProtocolConstants->
Flags;
1094 for (uint_fast8_t i = 0; i < tNumberOf32Or64BitChunks; ++i) {
1095 uint8_t tNumberOfBitsForOneSend;
1098 if (i == (tNumberOf32Or64BitChunks - 1)) {
1100 tNumberOfBitsForOneSend = tNumberOfBits;
1101 tFlags = tOriginalFlags;
1109 #if (__INT_WIDTH__ < 32)
1110 tDecodedRawData = pgm_read_dword(&aDecodedRawDataPGMArray[i]);
1112 tDecodedRawData = aDecodedRawDataPGMArray[i];
1121 tNumberOfCommands--;
1123 if (tNumberOfCommands > 0) {
1127 auto tFrameDurationMillis = millis() - tStartOfFrameMillis;
1140 IRDecodedRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
1143 memcpy_P(&tTemporaryPulseDistanceWidthProtocolConstants, aProtocolConstantsPGM,
1144 sizeof(tTemporaryPulseDistanceWidthProtocolConstants));
1149 IRDecodedRawDataType const *aDecodedRawDataPGMArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
1152 memcpy_P(&tTemporaryPulseDistanceWidthProtocolConstants, aProtocolConstantsPGM,
1153 sizeof(tTemporaryPulseDistanceWidthProtocolConstants));
1159 uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
1161 memcpy_P(&tTemporaryPulseDistanceWidthProtocolConstants, aProtocolConstantsPGM,
1162 sizeof(tTemporaryPulseDistanceWidthProtocolConstants));
1186 uint8_t tBitsToSend = aNumberOfBits;
1187 if (aSendStartBit) {
1190 uint32_t tMask = 1UL << (tBitsToSend - 1);
1192 bool tLastBitWasOne;
1194 if (aSendStartBit) {
1196 tNextBitIsOne =
true;
1197 tLastBitWasOne =
false;
1200 tNextBitIsOne = ((aData & tMask) != 0) ? 1 : 0;
1201 tLastBitWasOne =
false;
1205 for (uint_fast8_t i = tBitsToSend; i > 0; i--) {
1206 bool tCurrentBitIsOne = tNextBitIsOne;
1208 tNextBitIsOne = ((aData & tMask) != 0) || (i == 1);
1209 if (tCurrentBitIsOne) {
1211 space(aBiphaseTimeUnit);
1212 if (tNextBitIsOne) {
1213 mark(aBiphaseTimeUnit);
1216 mark(2 * aBiphaseTimeUnit);
1218 tLastBitWasOne =
true;
1222 if (!tLastBitWasOne) {
1223 mark(aBiphaseTimeUnit);
1225 space(aBiphaseTimeUnit);
1226 tLastBitWasOne =
false;
1249 #if defined(SEND_PWM_BY_TIMER) || defined(USE_NO_SEND_PWM)
1250 # if defined(LED_SEND_FEEDBACK_CODE)
1255 #if defined(SEND_PWM_BY_TIMER)
1264 #elif defined(USE_NO_SEND_PWM)
1268 # if defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN) && !defined(OUTPUT_OPEN_DRAIN)
1271 # elif defined(USE_ACTIVE_HIGH_OUTPUT_FOR_NO_SEND_PWM) || defined(USE_ACTIVE_HIGH_OUTPUT_FOR_SEND_PIN) // USE_ACTIVE_HIGH_OUTPUT_FOR_SEND_PIN is old and deprecated
1279 # if defined(LED_SEND_FEEDBACK_CODE)
1284 #else // defined(SEND_PWM_BY_TIMER)
1286 unsigned long tMicrosOfEndOfNextPWMPause = micros();
1287 # if defined(LED_SEND_FEEDBACK_CODE)
1288 unsigned long tStartMicros = tMicrosOfEndOfNextPWMPause + (136 / CLOCKS_PER_MICRO);
1289 bool tFeedbackLedIsActive =
false;
1291 unsigned long tStartMicros = tMicrosOfEndOfNextPWMPause + (112 / CLOCKS_PER_MICRO);
1303 # if defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN) || defined(USE_ACTIVE_LOW_OUTPUT_FOR_SEND_PIN)
1304 # if defined(USE_ACTIVE_LOW_OUTPUT_FOR_SEND_PIN) || defined(OUTPUT_OPEN_DRAIN)
1305 if (__builtin_constant_p(
sendPin)) {
1317 if (__builtin_constant_p(
sendPin)) {
1332 # if defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN) || defined(USE_ACTIVE_LOW_OUTPUT_FOR_SEND_PIN)
1333 # if defined(USE_ACTIVE_LOW_OUTPUT_FOR_SEND_PIN) || defined(OUTPUT_OPEN_DRAIN)
1334 if (__builtin_constant_p(
sendPin)) {
1344 if (__builtin_constant_p(
sendPin)) {
1356 # if defined(LED_SEND_FEEDBACK_CODE)
1360 if (!tFeedbackLedIsActive) {
1361 tFeedbackLedIsActive =
true;
1372 #if defined(__AVR__) // micros() for STM sometimes give decreasing values if interrupts are disabled. See https://github.com/stm32duino/Arduino_Core_STM32/issues/1680
1375 unsigned long tMicros;
1377 #if defined(_IR_MEASURE_TIMING) && defined(_IR_TIMING_TEST_PIN)
1386 #if defined(_IR_MEASURE_TIMING) && defined(_IR_TIMING_TEST_PIN)
1394 uint16_t tDeltaMicros = tMicros - tStartMicros;
1397 if (tDeltaMicros >= aMarkMicros) {
1398 #if defined(LED_SEND_FEEDBACK_CODE)
1401 #if defined(__AVR__)
1406 }
while (tMicros < tMicrosOfEndOfNextPWMPause);
1417 #if defined(SEND_PWM_BY_TIMER)
1419 #elif defined(USE_NO_SEND_PWM)
1420 # if defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN) && !defined(OUTPUT_OPEN_DRAIN)
1423 # elif defined(USE_ACTIVE_HIGH_OUTPUT_FOR_NO_SEND_PWM) || defined(USE_ACTIVE_HIGH_OUTPUT_FOR_SEND_PIN) // USE_ACTIVE_HIGH_OUTPUT_FOR_SEND_PIN is old and deprecated
1429 # if defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN) || defined(USE_ACTIVE_LOW_OUTPUT_FOR_SEND_PIN)
1430 # if defined(USE_ACTIVE_LOW_OUTPUT_FOR_SEND_PIN) || defined(OUTPUT_OPEN_DRAIN)
1431 if (__builtin_constant_p(
sendPin)) {
1440 if (__builtin_constant_p(
sendPin)) {
1448 #if defined(LED_SEND_FEEDBACK_CODE)
1467 #if defined(ESP32) || defined(ESP8266)
1472 if (aMicroseconds > 16383) {
1473 delay(aMicroseconds / 1000UL);
1475 delayMicroseconds(
static_cast<uint16_t
>(aMicroseconds % 1000UL));
1477 delayMicroseconds(aMicroseconds);
1481 # if defined(__AVR__)
1482 unsigned long start = micros() - (64 / clockCyclesPerMicrosecond());
1484 unsigned long start = micros();
1487 while (micros() - start < aMicroseconds) {
1499 #if defined(SEND_PWM_BY_TIMER)
1502 #elif defined(USE_NO_SEND_PWM)
1503 (void) aFrequencyKHz;
1507 # if defined(IR_SEND_PIN)
1513 #endif // defined(SEND_PWM_BY_TIMER)
1515 #if defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN) && defined(OUTPUT_OPEN_DRAIN) // the mode INPUT for mimicking open drain is set at IRLedOff()
1516 # if defined(IR_SEND_PIN)
1525 # if defined(__AVR__) || !defined(SEND_PWM_BY_TIMER)
1526 # if defined(IR_SEND_PIN)
1529 if (__builtin_constant_p(
sendPin)) {
1536 #endif // defined(USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN)
1539 #if defined(SEND_PWM_BY_TIMER)
1541 void IRsend::enableHighFrequencyIROut(uint_fast16_t aFrequencyKHz) {
1545 # if defined(__AVR__)
1546 # if defined(IR_SEND_PIN)
1560 #if defined(_IR_MEASURE_TIMING)
1561 #undef _IR_MEASURE_TIMING
1565 #endif // _IR_SEND_HPP