2021-01-28 07:58:26 +08:00
/**
* @ file IRremoteInt . h
2021-11-08 03:44:07 +08:00
* @ brief Contains all declarations required for the interface to IRremote .
2021-12-08 07:44:48 +08:00
* Could not be named IRremote . h , since this has another semantic ( it must include all * . hpp files ) for old example code found in the wild .
2021-01-28 07:58:26 +08:00
*
2021-03-03 02:59:41 +08:00
* This file is part of Arduino - IRremote https : //github.com/Arduino-IRremote/Arduino-IRremote.
2021-01-28 07:58:26 +08:00
*
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* MIT License
*
2023-02-24 09:40:21 +08:00
* Copyright ( c ) 2015 - 2023 Ken Shirriff http : //www.righto.com, Rafi Khan, Armin Joachimsmeyer
2021-01-28 07:58:26 +08:00
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to deal
* in the Software without restriction , including without limitation the rights
* to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
* copies of the Software , and to permit persons to whom the Software is furnished
* to do so , subject to the following conditions :
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software .
*
* THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR IMPLIED ,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER IN AN ACTION OF
* CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE .
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
2022-03-30 17:55:04 +08:00
# ifndef _IR_REMOTE_INT_H
# define _IR_REMOTE_INT_H
2021-01-28 07:58:26 +08:00
2021-03-06 08:21:46 +08:00
# include <Arduino.h>
2021-03-19 05:01:39 +08:00
# define MARK 1
# define SPACE 0
2021-11-03 13:57:27 +08:00
# if defined(PARTICLE)
# define F_CPU 16000000 // definition for a board for which F_CPU is not defined
# endif
2022-01-27 01:36:50 +08:00
# if defined(F_CPU) // F_CPU is used to generate the receive send timings in some CPU's
2021-11-03 13:57:27 +08:00
# define CLOCKS_PER_MICRO (F_CPU / MICROS_IN_ONE_SECOND)
# endif
/*
* For backwards compatibility
*/
# if defined(SYSCLOCK) // allow for processor specific code to define F_CPU
# undef F_CPU
# define F_CPU SYSCLOCK // Clock frequency to be used for timing.
# endif
2021-06-16 07:02:18 +08:00
//#define DEBUG // Activate this for lots of lovely debug output from the IRremote core and all protocol decoders.
//#define TRACE // Activate this for more debug output.
2021-04-27 03:50:31 +08:00
/**
* For better readability of code
*/
2022-02-12 02:14:29 +08:00
# define DISABLE_LED_FEEDBACK false
# define ENABLE_LED_FEEDBACK true
# define USE_DEFAULT_FEEDBACK_LED_PIN 0
2021-04-27 03:50:31 +08:00
2022-11-14 22:53:29 +08:00
/**
* The length of the buffer where the IR timing data is stored before decoding
* 100 is sufficient for most standard protocols , but air conditioners often send a longer protocol data stream
*/
# if !defined(RAW_BUFFER_LENGTH)
# if defined(DECODE_MAGIQUEST)
# define RAW_BUFFER_LENGTH 112 // MagiQuest requires 112 bytes.
# else
# define RAW_BUFFER_LENGTH 100 ///< Length of raw duration buffer. Must be even. 100 supports up to 48 bit codings inclusive 1 start and 1 stop bit.
//#define RAW_BUFFER_LENGTH 750 // 750 (600 if we have only 2k RAM) is the value for air condition remotes.
# endif
# endif
# if RAW_BUFFER_LENGTH % 2 == 1
# error RAW_BUFFER_LENGTH must be even, since the array consists of space / mark pairs.
# endif
2021-01-28 07:58:26 +08:00
2024-03-16 08:15:06 +08:00
# if RAW_BUFFER_LENGTH <= 254 // saves around 75 bytes program memory and speeds up ISR
typedef uint_fast8_t IRRawlenType ;
# else
typedef unsigned int IRRawlenType ;
# endif
2021-03-09 20:45:01 +08:00
/****************************************************
* Declarations for the receiver Interrupt Service Routine
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2021-01-28 07:58:26 +08:00
// ISR State-Machine : Receiver States
2023-03-01 21:00:31 +08:00
# define IR_REC_STATE_IDLE 0 // Counting the gap time and waiting for the start bit to arrive
# define IR_REC_STATE_MARK 1 // A mark was received and we are counting the duration of it.
# define IR_REC_STATE_SPACE 2 // A space was received and we are counting the duration of it. If space is too long, we assume end of frame.
# define IR_REC_STATE_STOP 3 // Stopped until set to IR_REC_STATE_IDLE which can only be done by resume()
2021-01-28 07:58:26 +08:00
/**
2021-03-09 08:31:31 +08:00
* This struct contains the data and control used for receiver static functions and the ISR ( interrupt service routine )
2021-03-06 08:21:46 +08:00
* Only StateForISR needs to be volatile . All the other fields are not written by ISR after data available and before start / resume .
2021-01-28 07:58:26 +08:00
*/
struct irparams_struct {
// The fields are ordered to reduce memory over caused by struct-padding
2022-08-06 20:39:28 +08:00
volatile uint8_t StateForISR ; ///< State Machine state
uint_fast8_t IRReceivePin ; ///< Pin connected to IR data from detector
2021-03-09 04:38:06 +08:00
# if defined(__AVR__)
volatile uint8_t * IRReceivePinPortInputRegister ;
uint8_t IRReceivePinMask ;
# endif
2023-11-03 05:03:25 +08:00
volatile uint_fast16_t TickCounterForISR ; ///< Counts 50uS ticks. The value is copied into the rawbuf array on every transition. Counting is independent of state or resume().
2022-11-10 07:58:54 +08:00
# if !IR_REMOTE_DISABLE_RECEIVE_COMPLETE_CALLBACK
void ( * ReceiveCompleteCallbackFunction ) ( void ) ; ///< The function to call if a protocol message has arrived, i.e. StateForISR changed to IR_REC_STATE_STOP
# endif
2022-08-06 20:39:28 +08:00
bool OverflowFlag ; ///< Raw buffer OverflowFlag occurred
2024-03-16 08:15:06 +08:00
IRRawlenType rawlen ; ///< counter of entries in rawbuf
2023-02-24 09:40:21 +08:00
uint16_t rawbuf [ RAW_BUFFER_LENGTH ] ; ///< raw data / tick counts per mark/space, first entry is the length of the gap between previous and current command
2021-01-28 07:58:26 +08:00
} ;
2022-12-02 07:28:03 +08:00
# if (__INT_WIDTH__ < 32)
2022-11-22 19:28:10 +08:00
typedef uint32_t IRRawDataType ;
2023-02-24 09:40:21 +08:00
# define BITS_IN_RAW_DATA_TYPE 32
2022-11-22 19:28:10 +08:00
# else
typedef uint64_t IRRawDataType ;
2023-02-24 09:40:21 +08:00
# define BITS_IN_RAW_DATA_TYPE 64
2022-11-22 19:28:10 +08:00
# endif
2022-11-14 22:53:29 +08:00
# include "IRProtocol.h"
2021-03-09 04:38:06 +08:00
/*
* Debug directives
2023-10-09 17:37:56 +08:00
* Outputs with IR_DEBUG_PRINT can only be activated by defining DEBUG !
* If LOCAL_DEBUG is defined in one file , all outputs with IR_DEBUG_PRINT are still suppressed .
2021-03-09 04:38:06 +08:00
*/
2022-07-17 03:33:09 +08:00
# if defined(DEBUG) || defined(TRACE)
2021-11-29 20:41:03 +08:00
# define IR_DEBUG_PRINT(...) Serial.print(__VA_ARGS__)
# define IR_DEBUG_PRINTLN(...) Serial.println(__VA_ARGS__)
2021-01-28 07:58:26 +08:00
# else
/**
* If DEBUG , print the arguments , otherwise do nothing .
*/
2021-11-29 20:41:03 +08:00
# define IR_DEBUG_PRINT(...) void()
2021-01-28 07:58:26 +08:00
/**
* If DEBUG , print the arguments as a line , otherwise do nothing .
*/
2021-11-29 20:41:03 +08:00
# define IR_DEBUG_PRINTLN(...) void()
2021-01-28 07:58:26 +08:00
# endif
2022-03-30 17:55:04 +08:00
# if defined(TRACE)
2021-11-29 20:41:03 +08:00
# define IR_TRACE_PRINT(...) Serial.print(__VA_ARGS__)
# define IR_TRACE_PRINTLN(...) Serial.println(__VA_ARGS__)
2021-01-28 07:58:26 +08:00
# else
2021-11-29 20:41:03 +08:00
# define IR_TRACE_PRINT(...) void()
# define IR_TRACE_PRINTLN(...) void()
2021-01-28 07:58:26 +08:00
# endif
/****************************************************
* RECEIVING
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2021-11-11 07:36:23 +08:00
/**
* Results returned from old decoders ! ! ! deprecated ! ! !
*/
struct decode_results {
decode_type_t decode_type ; // deprecated, moved to decodedIRData.protocol ///< UNKNOWN, NEC, SONY, RC5, ...
2022-08-06 20:39:28 +08:00
uint16_t address ; // Used by Panasonic & Sharp [16-bits]
2021-11-11 07:36:23 +08:00
uint32_t value ; // deprecated, moved to decodedIRData.decodedRawData ///< Decoded value / command [max 32-bits]
uint8_t bits ; // deprecated, moved to decodedIRData.numberOfBits ///< Number of bits in decoded value
uint16_t magnitude ; // deprecated, moved to decodedIRData.extra ///< Used by MagiQuest [16-bits]
bool isRepeat ; // deprecated, moved to decodedIRData.flags ///< True if repeat of value is detected
2023-10-09 17:37:56 +08:00
// next 3 values are copies of irparams_struct values - see above
2023-02-24 09:40:21 +08:00
uint16_t * rawbuf ; // deprecated, moved to decodedIRData.rawDataPtr->rawbuf ///< Raw intervals in 50uS ticks
2022-06-27 07:18:44 +08:00
uint_fast8_t rawlen ; // deprecated, moved to decodedIRData.rawDataPtr->rawlen ///< Number of records in rawbuf
2021-11-11 07:36:23 +08:00
bool overflow ; // deprecated, moved to decodedIRData.flags ///< true if IR raw code too long
} ;
2021-03-18 04:52:41 +08:00
/**
* Main class for receiving IR signals
*/
2021-01-28 07:58:26 +08:00
class IRrecv {
public :
IRrecv ( ) ;
2022-05-19 15:51:34 +08:00
IRrecv ( uint_fast8_t aReceivePin ) ;
IRrecv ( uint_fast8_t aReceivePin , uint_fast8_t aFeedbackLEDPin ) ;
void setReceivePin ( uint_fast8_t aReceivePinNumber ) ;
2022-11-10 07:58:54 +08:00
void registerReceiveCompleteCallback ( void ( * aReceiveCompleteCallbackFunction ) ( void ) ) ;
2021-01-28 07:58:26 +08:00
/*
* Stream like API
*/
2022-05-21 00:54:51 +08:00
void begin ( uint_fast8_t aReceivePin , bool aEnableLEDFeedback = false , uint_fast8_t aFeedbackLEDPin =
2022-07-12 17:46:04 +08:00
USE_DEFAULT_FEEDBACK_LED_PIN ) ;
2024-02-24 02:28:33 +08:00
void restartTimer ( ) ;
2022-05-21 00:54:51 +08:00
void start ( ) ;
void enableIRIn ( ) ; // alias for start
2021-09-28 05:46:13 +08:00
void start ( uint32_t aMicrosecondsToAddToGapCounter ) ;
2024-02-24 02:28:33 +08:00
void restartTimer ( uint32_t aMicrosecondsToAddToGapCounter ) ;
2022-12-15 08:34:02 +08:00
void startWithTicksToAdd ( uint16_t aTicksToAddToGapCounter ) ;
2024-02-24 02:28:33 +08:00
void restartTimerWithTicksToAdd ( uint16_t aTicksToAddToGapCounter ) ;
2022-05-21 00:54:51 +08:00
void restartAfterSend ( ) ;
2023-03-01 21:00:31 +08:00
void addTicksToInternalTickCounter ( uint16_t aTicksToAddToInternalTickCounter ) ;
void addMicrosToInternalTickCounter ( uint16_t aMicrosecondsToAddToInternalTickCounter ) ;
2021-01-28 07:58:26 +08:00
bool available ( ) ;
IRData * read ( ) ; // returns decoded data
// write is a method of class IRsend below
2022-08-31 19:25:29 +08:00
// size_t write(IRData *aIRSendData, int_fast8_t aNumberOfRepeats = NO_REPEATS);
2024-02-24 02:28:33 +08:00
void stopTimer ( ) ;
2022-05-21 00:54:51 +08:00
void stop ( ) ;
void disableIRIn ( ) ; // alias for stop
void end ( ) ; // alias for stop
2021-01-28 07:58:26 +08:00
bool isIdle ( ) ;
/*
* The main functions
*/
bool decode ( ) ; // Check if available and try to decode
void resume ( ) ; // Enable receiving of the next value
/*
* Useful info and print functions
*/
2021-02-19 06:43:11 +08:00
void printIRResultMinimal ( Print * aSerial ) ;
2021-01-28 07:58:26 +08:00
void printIRResultRawFormatted ( Print * aSerial , bool aOutputMicrosecondsInsteadOfTicks = true ) ;
void printIRResultAsCVariables ( Print * aSerial ) ;
2023-02-24 09:40:21 +08:00
uint32_t getTotalDurationOfRawData ( ) ;
2022-07-25 21:09:53 +08:00
/*
2022-07-27 07:19:00 +08:00
* Next 4 functions are also available as non member functions
2022-07-25 21:09:53 +08:00
*/
2022-11-14 08:27:45 +08:00
bool printIRResultShort ( Print * aSerial , bool aPrintRepeatGap = true , bool aCheckForRecordGapsMicros = true ) ;
2023-02-24 09:40:21 +08:00
void printDistanceWidthTimingInfo ( Print * aSerial , DistanceWidthTimingInfoStruct * aDistanceWidthTimingInfo ) ;
2022-07-12 17:46:04 +08:00
void printIRSendUsage ( Print * aSerial ) ;
2022-08-31 20:07:41 +08:00
# if defined(__AVR__)
2022-07-25 21:09:53 +08:00
const __FlashStringHelper * getProtocolString ( ) ;
2022-08-31 20:07:41 +08:00
# else
const char * getProtocolString ( ) ;
# endif
2022-07-27 07:19:00 +08:00
static void printActiveIRProtocols ( Print * aSerial ) ;
2021-01-28 07:58:26 +08:00
void compensateAndPrintIRResultAsCArray ( Print * aSerial , bool aOutputMicrosecondsInsteadOfTicks = true ) ;
2023-02-24 09:40:21 +08:00
void compensateAndPrintIRResultAsPronto ( Print * aSerial , uint16_t frequency = 38000U ) ;
2021-01-28 07:58:26 +08:00
/*
* Store the data for further processing
*/
void compensateAndStoreIRResultInArray ( uint8_t * aArrayPtr ) ;
2023-02-24 09:40:21 +08:00
size_t compensateAndStorePronto ( String * aString , uint16_t frequency = 38000U ) ;
2021-01-28 07:58:26 +08:00
/*
* The main decoding functions used by the individual decoders
*/
2022-11-10 05:49:55 +08:00
bool decodePulseDistanceWidthData ( PulseDistanceWidthProtocolConstants * aProtocolConstants , uint_fast8_t aNumberOfBits ,
2024-03-16 08:15:06 +08:00
IRRawlenType aStartOffset = 3 ) ;
2022-08-31 19:25:29 +08:00
2024-03-16 08:15:06 +08:00
bool decodePulseDistanceWidthData ( uint_fast8_t aNumberOfBits , IRRawlenType aStartOffset , uint16_t aOneMarkMicros ,
2023-02-24 09:40:21 +08:00
uint16_t aZeroMarkMicros , uint16_t aOneSpaceMicros , uint16_t aZeroSpaceMicros , bool aMSBfirst ) ;
2022-11-08 07:36:44 +08:00
2024-03-16 08:15:06 +08:00
bool decodeBiPhaseData ( uint_fast8_t aNumberOfBits , IRRawlenType aStartOffset , uint_fast8_t aStartClockCount ,
2023-02-24 09:40:21 +08:00
uint_fast8_t aValueOfSpaceToMarkTransition , uint16_t aBiphaseTimeUnit ) ;
2021-01-28 07:58:26 +08:00
2023-02-24 09:40:21 +08:00
void initBiphaselevel ( uint_fast8_t aRCDecodeRawbuffOffset , uint16_t aBiphaseTimeUnit ) ;
2022-05-19 15:51:34 +08:00
uint_fast8_t getBiphaselevel ( ) ;
2021-03-19 05:01:39 +08:00
2021-01-28 07:58:26 +08:00
/*
* All standard ( decode address + command ) protocol decoders
*/
2022-10-02 16:00:58 +08:00
bool decodeBangOlufsen ( ) ;
2021-01-28 07:58:26 +08:00
bool decodeBoseWave ( ) ;
bool decodeDenon ( ) ;
2023-02-24 09:40:21 +08:00
bool decodeFAST ( ) ;
2021-01-28 07:58:26 +08:00
bool decodeJVC ( ) ;
bool decodeKaseikyo ( ) ;
bool decodeLegoPowerFunctions ( ) ;
bool decodeLG ( ) ;
bool decodeMagiQuest ( ) ; // not completely standard
bool decodeNEC ( ) ;
bool decodeRC5 ( ) ;
bool decodeRC6 ( ) ;
bool decodeSamsung ( ) ;
bool decodeSharp ( ) ; // redirected to decodeDenon()
bool decodeSony ( ) ;
2021-12-08 21:14:04 +08:00
bool decodeWhynter ( ) ;
2021-01-28 07:58:26 +08:00
2022-11-09 21:01:52 +08:00
bool decodeDistanceWidth ( ) ;
2021-04-28 00:30:41 +08:00
2021-01-28 07:58:26 +08:00
bool decodeHash ( ) ;
// Template function :-)
bool decodeShuzu ( ) ;
/*
* Old functions
*/
2021-04-08 13:59:45 +08:00
bool decodeDenonOld ( decode_results * aResults ) ;
bool decodeJVCMSB ( decode_results * aResults ) ;
bool decodeLGMSB ( decode_results * aResults ) ;
bool decodeNECMSB ( decode_results * aResults ) ;
bool decodePanasonicMSB ( decode_results * aResults ) ;
bool decodeSonyMSB ( decode_results * aResults ) ;
bool decodeSAMSUNG ( decode_results * aResults ) ;
bool decodeHashOld ( decode_results * aResults ) ;
2023-03-23 17:21:54 +08:00
bool decode_old ( decode_results * aResults ) ;
2021-04-10 22:49:28 +08:00
bool decode (
decode_results * aResults )
2023-05-30 06:29:06 +08:00
__attribute__ ( ( deprecated ( " Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> . " ) ) ) ;
2021-01-28 07:58:26 +08:00
2021-09-09 21:53:50 +08:00
// for backward compatibility. Now in IRFeedbackLED.hpp
2022-02-12 02:14:29 +08:00
void blink13 ( uint8_t aEnableLEDFeedback )
2023-05-30 06:29:06 +08:00
__attribute__ ( ( deprecated ( " Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback(). " ) ) ) ;
2021-09-06 16:37:22 +08:00
2021-01-28 07:58:26 +08:00
/*
* Internal functions
*/
void initDecodedIRData ( ) ;
2023-02-24 09:40:21 +08:00
uint_fast8_t compare ( uint16_t oldval , uint16_t newval ) ;
2022-11-10 05:49:55 +08:00
bool checkHeader ( PulseDistanceWidthProtocolConstants * aProtocolConstants ) ;
2023-02-24 09:40:21 +08:00
void checkForRepeatSpaceTicksAndSetFlag ( uint16_t aMaximumRepeatSpaceTicks ) ;
2022-11-14 08:27:45 +08:00
bool checkForRecordGapsMicros ( Print * aSerial ) ;
2021-01-28 07:58:26 +08:00
2024-02-24 02:28:33 +08:00
IRData decodedIRData ; // Decoded IR data for the application
2021-01-28 07:58:26 +08:00
2022-11-17 08:06:10 +08:00
// Last decoded IR data for repeat detection and parity for Denon autorepeat
2021-04-29 23:33:05 +08:00
decode_type_t lastDecodedProtocol ;
2021-01-28 07:58:26 +08:00
uint32_t lastDecodedAddress ;
uint32_t lastDecodedCommand ;
2021-03-06 08:21:46 +08:00
uint8_t repeatCount ; // Used e.g. for Denon decode for autorepeat decoding.
2021-01-28 07:58:26 +08:00
} ;
2022-05-19 15:51:34 +08:00
extern uint_fast8_t sBiphaseDecodeRawbuffOffset ; //
2021-03-19 05:01:39 +08:00
2021-03-09 20:45:01 +08:00
/*
* Mark & Space matching functions
*/
2023-02-24 09:40:21 +08:00
bool matchTicks ( uint16_t aMeasuredTicks , uint16_t aMatchValueMicros ) ;
bool matchMark ( uint16_t aMeasuredTicks , uint16_t aMatchValueMicros ) ;
bool matchSpace ( uint16_t aMeasuredTicks , uint16_t aMatchValueMicros ) ;
2021-03-09 20:45:01 +08:00
/*
* Old function names
*/
2023-02-24 09:40:21 +08:00
bool MATCH ( uint16_t measured , uint16_t desired ) ;
bool MATCH_MARK ( uint16_t measured_ticks , uint16_t desired_us ) ;
bool MATCH_SPACE ( uint16_t measured_ticks , uint16_t desired_us ) ;
2021-03-09 20:45:01 +08:00
int getMarkExcessMicros ( ) ;
2022-11-14 08:27:45 +08:00
2022-07-27 07:19:00 +08:00
void printActiveIRProtocols ( Print * aSerial ) ;
2021-01-28 07:58:26 +08:00
2021-03-09 20:45:01 +08:00
/****************************************************
* Feedback LED related functions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2022-02-12 02:14:29 +08:00
# define DO_NOT_ENABLE_LED_FEEDBACK 0x00
# define LED_FEEDBACK_DISABLED_COMPLETELY 0x00
# define LED_FEEDBACK_ENABLED_FOR_RECEIVE 0x01
# define LED_FEEDBACK_ENABLED_FOR_SEND 0x02
2021-03-09 20:45:01 +08:00
void setFeedbackLED ( bool aSwitchLedOn ) ;
2022-02-12 02:14:29 +08:00
void setLEDFeedback ( uint8_t aFeedbackLEDPin , uint8_t aEnableLEDFeedback ) ; // if aFeedbackLEDPin == 0, then take board BLINKLED_ON() and BLINKLED_OFF() functions
2021-09-06 16:37:22 +08:00
void setLEDFeedback ( bool aEnableLEDFeedback ) ; // Direct replacement for blink13()
2021-03-09 20:45:01 +08:00
void enableLEDFeedback ( ) ;
2022-02-12 02:14:29 +08:00
constexpr auto enableLEDFeedbackForReceive = enableLEDFeedback ; // alias for enableLEDFeedback
2021-03-09 20:45:01 +08:00
void disableLEDFeedback ( ) ;
2022-02-12 02:14:29 +08:00
constexpr auto disableLEDFeedbackForReceive = disableLEDFeedback ; // alias for enableLEDFeedback
void enableLEDFeedbackForSend ( ) ;
void disableLEDFeedbackForSend ( ) ;
2021-03-09 20:45:01 +08:00
void setBlinkPin ( uint8_t aFeedbackLEDPin ) __attribute__ ( ( deprecated ( " Please use setLEDFeedback(). " ) ) ) ; // deprecated
/*
2021-12-30 20:55:31 +08:00
* Pulse parms are ( ( X * 50 ) - MARK_EXCESS_MICROS ) for the Mark and ( ( X * 50 ) + MARK_EXCESS_MICROS ) for the Space .
2021-03-09 20:45:01 +08:00
* First MARK is the one after the long gap
2021-12-30 20:55:31 +08:00
* Pulse parameters in microseconds
2021-03-09 20:45:01 +08:00
*/
2022-03-24 16:06:00 +08:00
# if !defined(TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING)
# define TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING 25 // Relative tolerance (in percent) for matchTicks(), matchMark() and matchSpace() functions used for protocol decoding.
# endif
2021-03-09 20:45:01 +08:00
/** Lower tolerance for comparison of measured data */
//#define LTOL (1.0 - (TOLERANCE/100.))
2022-03-24 16:06:00 +08:00
# define LTOL (100 - TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING)
2021-03-09 20:45:01 +08:00
/** Upper tolerance for comparison of measured data */
//#define UTOL (1.0 + (TOLERANCE/100.))
2022-03-24 16:06:00 +08:00
# define UTOL (100 + TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING)
2021-03-09 20:45:01 +08:00
//#define TICKS_LOW(us) ((int)(((us)*LTOL/MICROS_PER_TICK)))
//#define TICKS_HIGH(us) ((int)(((us)*UTOL/MICROS_PER_TICK + 1)))
2022-03-24 16:06:00 +08:00
# if MICROS_PER_TICK == 50 && TOLERANCE_FOR_DECODERS_MARK_OR_SPACE_MATCHING == 25 // Defaults
2021-03-09 20:45:01 +08:00
# define TICKS_LOW(us) ((us) / 67 ) // (us) / ((MICROS_PER_TICK:50 / LTOL:75 ) * 100)
2021-12-30 20:55:31 +08:00
# define TICKS_HIGH(us) (((us) / 40) + 1) // (us) / ((MICROS_PER_TICK:50 / UTOL:125) * 100) + 1
2021-03-09 20:45:01 +08:00
# else
2023-02-24 09:40:21 +08:00
# define TICKS_LOW(us) ((uint16_t ) ((long) (us) * LTOL / (MICROS_PER_TICK * 100) ))
# define TICKS_HIGH(us) ((uint16_t ) ((long) (us) * UTOL / (MICROS_PER_TICK * 100) + 1))
2021-03-09 20:45:01 +08:00
# endif
/*
* The receiver instance
*/
extern IRrecv IrReceiver ;
2023-03-01 20:37:15 +08:00
/*
* The receiver interrupt handler for timer interrupt
*/
void IRReceiveTimerInterruptHandler ( ) ;
2021-01-28 07:58:26 +08:00
/****************************************************
* SENDING
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2021-03-18 04:52:41 +08:00
/**
2021-01-28 07:58:26 +08:00
* Just for better readability of code
*/
# define NO_REPEATS 0
2021-03-18 04:52:41 +08:00
# define SEND_REPEAT_COMMAND true ///< used for e.g. NEC, where a repeat is different from just repeating the data.
2021-03-09 20:45:01 +08:00
2021-01-28 07:58:26 +08:00
/**
2021-03-18 04:52:41 +08:00
* Main class for sending IR signals
2021-01-28 07:58:26 +08:00
*/
class IRsend {
public :
2021-11-03 13:57:27 +08:00
IRsend ( ) ;
2022-01-27 01:36:50 +08:00
/*
2024-01-01 06:53:49 +08:00
* IR_SEND_PIN is defined or fixed by timer , value of IR_SEND_PIN is then " DeterminedByTimer "
2022-01-27 01:36:50 +08:00
*/
2022-05-21 00:54:51 +08:00
# if defined(IR_SEND_PIN)
2021-11-03 13:57:27 +08:00
void begin ( ) ;
2024-02-27 16:55:39 +08:00
// The default parameter allowed to specify IrSender.begin(7); without errors, if IR_SEND_PIN was defined. But the semantics is not the one the user expect.
void begin ( bool aEnableLEDFeedback , uint_fast8_t aFeedbackLEDPin ) ; // 4.3.1 Removed default value USE_DEFAULT_FEEDBACK_LED_PIN for last parameter
// The next function is a dummy to avoid acceptance of pre 4.3 calls to begin(DISABLE_LED_FEEDBACK);
void begin ( uint8_t aSendPin )
# if !defined (DOXYGEN)
__attribute__ ( ( deprecated ( " Error: IR_SEND_PIN is still defined, therefore the function begin(aSendPin) is NOT available. You must disable '#define IR_SEND_PIN' to enable this function. " ) ) ) ;
# endif
2022-10-19 16:50:44 +08:00
// The next function is a dummy to avoid acceptance of pre 4.0 calls to begin(IR_SEND_PIN, DISABLE_LED_FEEDBACK);
void begin ( uint_fast8_t aSendPin , bool aEnableLEDFeedback )
2022-12-30 01:46:09 +08:00
# if !defined (DOXYGEN)
2024-02-27 16:55:39 +08:00
__attribute__ ( ( deprecated ( " You must use begin() and enableLEDFeedback() or disableLEDFeedback() since version 4.3. " ) ) ) ;
2022-12-30 01:46:09 +08:00
# endif
2022-01-27 01:36:50 +08:00
# else
2022-05-19 15:51:34 +08:00
IRsend ( uint_fast8_t aSendPin ) ;
void begin ( uint_fast8_t aSendPin ) ;
2022-05-21 00:54:51 +08:00
void setSendPin ( uint_fast8_t aSendPin ) ; // required if we use IRsend() as constructor
2022-10-19 16:50:44 +08:00
// Since 4.0 guarded and without default parameter
void begin ( uint_fast8_t aSendPin , bool aEnableLEDFeedback , uint_fast8_t aFeedbackLEDPin ) ; // aFeedbackLEDPin can be USE_DEFAULT_FEEDBACK_LED_PIN
2022-01-27 01:36:50 +08:00
# endif
2021-12-08 07:44:48 +08:00
2022-08-31 19:25:29 +08:00
size_t write ( IRData * aIRSendData , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
2023-02-24 09:40:21 +08:00
size_t write ( decode_type_t aProtocol , uint16_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
2021-01-28 07:58:26 +08:00
2022-05-19 15:51:34 +08:00
void enableIROut ( uint_fast8_t aFrequencyKHz ) ;
2023-03-29 19:28:06 +08:00
# if defined(SEND_PWM_BY_TIMER)
void enableHighFrequencyIROut ( uint_fast16_t aFrequencyKHz ) ; // Used for Bang&Olufsen
# endif
2021-01-28 07:58:26 +08:00
2023-02-24 09:40:21 +08:00
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 ,
2022-11-22 19:28:10 +08:00
int_fast8_t aNumberOfRepeats ) ;
void sendPulseDistanceWidthFromArray ( PulseDistanceWidthProtocolConstants * aProtocolConstants ,
2023-02-24 09:40:21 +08:00
IRRawDataType * aDecodedRawDataArray , uint16_t aNumberOfBits , int_fast8_t aNumberOfRepeats ) ;
void sendPulseDistanceWidthFromArray ( uint_fast8_t aFrequencyKHz , DistanceWidthTimingInfoStruct * aDistanceWidthTimingInfo ,
IRRawDataType * aDecodedRawDataArray , uint16_t aNumberOfBits , uint8_t aFlags , uint16_t aRepeatPeriodMillis ,
int_fast8_t aNumberOfRepeats ) ;
2023-02-12 20:02:01 +08:00
void sendPulseDistanceWidth ( PulseDistanceWidthProtocolConstants * aProtocolConstants , IRRawDataType aData ,
uint_fast8_t aNumberOfBits , int_fast8_t aNumberOfRepeats ) ;
2022-11-22 19:28:10 +08:00
void sendPulseDistanceWidthData ( PulseDistanceWidthProtocolConstants * aProtocolConstants , IRRawDataType aData ,
2022-08-31 19:25:29 +08:00
uint_fast8_t aNumberOfBits ) ;
2023-02-24 09:40:21 +08:00
void sendPulseDistanceWidth ( uint_fast8_t aFrequencyKHz , uint16_t aHeaderMarkMicros , uint16_t aHeaderSpaceMicros ,
uint16_t aOneMarkMicros , uint16_t aOneSpaceMicros , uint16_t aZeroMarkMicros , uint16_t aZeroSpaceMicros ,
IRRawDataType aData , uint_fast8_t aNumberOfBits , uint8_t aFlags , uint16_t aRepeatPeriodMillis ,
2022-08-31 19:25:29 +08:00
int_fast8_t aNumberOfRepeats , void ( * aSpecialSendRepeatFunction ) ( ) = NULL ) ;
2023-02-24 09:40:21 +08:00
void sendPulseDistanceWidth ( uint_fast8_t aFrequencyKHz , uint16_t aHeaderMarkMicros , uint16_t aHeaderSpaceMicros ,
uint16_t aOneMarkMicros , uint16_t aOneSpaceMicros , uint16_t aZeroMarkMicros , uint16_t aZeroSpaceMicros ,
IRRawDataType aData , uint_fast8_t aNumberOfBits , bool aMSBFirst , bool aSendStopBit , uint16_t aRepeatPeriodMillis ,
int_fast8_t aNumberOfRepeats , void ( * aSpecialSendRepeatFunction ) ( ) = NULL )
__attribute__ ( ( deprecated ( " Since version 4.1.0 parameter aSendStopBit is not longer required. " ) ) ) ;
void sendPulseDistanceWidthData ( uint16_t aOneMarkMicros , uint16_t aOneSpaceMicros , uint16_t aZeroMarkMicros ,
uint16_t aZeroSpaceMicros , IRRawDataType aData , uint_fast8_t aNumberOfBits , uint8_t aFlags ) ;
void sendBiphaseData ( uint16_t aBiphaseTimeUnit , uint32_t aData , uint_fast8_t aNumberOfBits ) ;
void mark ( uint16_t aMarkMicros ) ;
static void space ( uint16_t aSpaceMicros ) ;
2021-04-11 19:16:53 +08:00
void IRLedOff ( ) ;
2021-01-28 07:58:26 +08:00
// 8 Bit array
2022-06-25 07:49:49 +08:00
void sendRaw ( const uint8_t aBufferWithTicks [ ] , uint_fast16_t aLengthOfBuffer , uint_fast8_t aIRFrequencyKilohertz ) ;
void sendRaw_P ( const uint8_t aBufferWithTicks [ ] , uint_fast16_t aLengthOfBuffer , uint_fast8_t aIRFrequencyKilohertz ) ;
2021-01-28 07:58:26 +08:00
// 16 Bit array
2022-06-25 07:49:49 +08:00
void sendRaw ( const uint16_t aBufferWithMicroseconds [ ] , uint_fast16_t aLengthOfBuffer , uint_fast8_t aIRFrequencyKilohertz ) ;
void sendRaw_P ( const uint16_t aBufferWithMicroseconds [ ] , uint_fast16_t aLengthOfBuffer , uint_fast8_t aIRFrequencyKilohertz ) ;
2021-01-28 07:58:26 +08:00
/*
* New send functions
*/
2022-11-10 07:58:54 +08:00
void sendBangOlufsen ( uint16_t aHeader , uint8_t aData , int_fast8_t aNumberOfRepeats = NO_REPEATS ,
int8_t aNumberOfHeaderBits = 8 ) ;
void sendBangOlufsenDataLink ( uint32_t aHeader , uint8_t aData , int_fast8_t aNumberOfRepeats = NO_REPEATS ,
int8_t aNumberOfHeaderBits = 8 ) ;
2022-10-03 02:45:57 +08:00
void sendBangOlufsenRaw ( uint32_t aRawData , int_fast8_t aBits , bool aBackToBack = false ) ;
2022-11-10 07:58:54 +08:00
void sendBangOlufsenRawDataLink ( uint64_t aRawData , int_fast8_t aBits , bool aBackToBack = false ,
bool aUseDatalinkTiming = false ) ;
2022-08-31 19:25:29 +08:00
void sendBoseWave ( uint8_t aCommand , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
void sendDenon ( uint8_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats , bool aSendSharp = false ) ;
void sendDenonRaw ( uint16_t aRawData , int_fast8_t aNumberOfRepeats = NO_REPEATS )
2021-06-21 06:32:42 +08:00
# if !defined (DOXYGEN)
2021-04-10 22:49:28 +08:00
__attribute__ ( ( deprecated ( " Please use sendDenon(aAddress, aCommand, aNumberOfRepeats). " ) ) ) ;
2021-06-21 06:32:42 +08:00
# endif
2023-02-24 09:40:21 +08:00
void sendFAST ( uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2022-08-31 19:25:29 +08:00
void sendJVC ( uint8_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2021-01-28 07:58:26 +08:00
2022-08-31 19:25:29 +08:00
void sendLG2Repeat ( ) ;
uint32_t computeLGRawDataAndChecksum ( uint8_t aAddress , uint16_t aCommand ) ;
void sendLG ( uint8_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendLG2 ( uint8_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendLGRaw ( uint32_t aRawData , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
2021-02-03 23:07:01 +08:00
2021-01-28 07:58:26 +08:00
void sendNECRepeat ( ) ;
2022-08-31 19:25:29 +08:00
uint32_t computeNECRawDataAndChecksum ( uint16_t aAddress , uint16_t aCommand ) ;
void sendNEC ( uint16_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendNEC2 ( uint16_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendNECRaw ( uint32_t aRawData , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
2021-04-08 07:51:03 +08:00
// NEC variants
2022-08-31 19:25:29 +08:00
void sendOnkyo ( uint16_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendApple ( uint8_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendKaseikyo ( uint16_t aAddress , uint8_t aData , int_fast8_t aNumberOfRepeats , uint16_t aVendorCode ) ; // LSB first
void sendPanasonic ( uint16_t aAddress , uint8_t aData , int_fast8_t aNumberOfRepeats ) ; // LSB first
void sendKaseikyo_Denon ( uint16_t aAddress , uint8_t aData , int_fast8_t aNumberOfRepeats ) ; // LSB first
void sendKaseikyo_Mitsubishi ( uint16_t aAddress , uint8_t aData , int_fast8_t aNumberOfRepeats ) ; // LSB first
void sendKaseikyo_Sharp ( uint16_t aAddress , uint8_t aData , int_fast8_t aNumberOfRepeats ) ; // LSB first
void sendKaseikyo_JVC ( uint16_t aAddress , uint8_t aData , int_fast8_t aNumberOfRepeats ) ; // LSB first
void sendRC5 ( uint8_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats , bool aEnableAutomaticToggle = true ) ;
void sendRC6 ( uint8_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats , bool aEnableAutomaticToggle = true ) ;
2022-08-28 02:22:58 +08:00
void sendSamsungLGRepeat ( ) ;
2022-08-31 19:25:29 +08:00
void sendSamsung ( uint16_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2024-04-26 03:16:40 +08:00
void sendSamsung16BitAddressAnd8BitCommand ( uint16_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2024-02-24 02:28:33 +08:00
void sendSamsung16BitAddressAndCommand ( uint16_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2023-01-08 03:52:51 +08:00
void sendSamsung48 ( uint16_t aAddress , uint32_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2022-08-31 19:25:29 +08:00
void sendSamsungLG ( uint16_t aAddress , uint16_t aCommand , int_fast8_t aNumberOfRepeats ) ;
void sendSharp ( uint8_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ; // redirected to sendDenon
void sendSony ( uint16_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats , uint8_t numberOfBits = 12 ) ; // SIRCS_12_PROTOCOL
2021-01-28 07:58:26 +08:00
void sendLegoPowerFunctions ( uint8_t aChannel , uint8_t tCommand , uint8_t aMode , bool aDoSend5Times = true ) ;
void sendLegoPowerFunctions ( uint16_t aRawData , bool aDoSend5Times = true ) ;
void sendLegoPowerFunctions ( uint16_t aRawData , uint8_t aChannel , bool aDoSend5Times = true ) ;
2022-09-15 08:53:46 +08:00
void sendMagiQuest ( uint32_t aWandId , uint16_t aMagnitude ) ;
2021-01-28 07:58:26 +08:00
2022-08-31 19:25:29 +08:00
void sendPronto ( const __FlashStringHelper * str , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
void sendPronto ( const char * prontoHexString , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
2023-02-24 09:40:21 +08:00
void sendPronto ( const uint16_t * data , uint16_t length , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
2022-07-12 17:46:04 +08:00
2021-01-28 07:58:26 +08:00
# if defined(__AVR__)
2022-08-31 19:25:29 +08:00
void sendPronto_PF ( uint_farptr_t str , int_fast8_t aNumberOfRepeats = NO_REPEATS ) ;
void sendPronto_P ( const char * str , int_fast8_t aNumberOfRepeats ) ;
2021-01-28 07:58:26 +08:00
# endif
// Template protocol :-)
2022-08-31 19:25:29 +08:00
void sendShuzu ( uint16_t aAddress , uint8_t aCommand , int_fast8_t aNumberOfRepeats ) ;
2021-01-28 07:58:26 +08:00
/*
* OLD send functions
*/
2023-02-12 20:02:01 +08:00
void sendDenon ( unsigned long data ,
int nbits )
__attribute__ ( ( deprecated ( " The function sendDenon(data, nbits) is deprecated and may not work as expected! Use sendDenonRaw(data, NumberOfRepeats) or better sendDenon(Address, Command, NumberOfRepeats). " ) ) ) ;
2022-08-31 19:25:29 +08:00
void sendDish ( uint16_t aData ) ;
2021-04-27 03:50:31 +08:00
void sendJVC ( unsigned long data , int nbits ,
bool repeat )
__attribute__ ( ( deprecated ( " This old function sends MSB first! Please use sendJVC(aAddress, aCommand, aNumberOfRepeats). " ) ) ) {
2021-04-10 22:49:28 +08:00
sendJVCMSB ( data , nbits , repeat ) ;
}
2021-01-30 07:50:58 +08:00
void sendJVCMSB ( unsigned long data , int nbits , bool repeat = false ) ;
2021-04-10 22:49:28 +08:00
2023-02-24 09:40:21 +08:00
void sendLG ( unsigned long data ,
int nbits )
__attribute__ ( ( deprecated ( " The function sendLG(data, nbits) is deprecated and may not work as expected! Use sendLGRaw(data, NumberOfRepeats) or better sendLG(Address, Command, NumberOfRepeats). " ) ) ) ;
2021-04-10 22:49:28 +08:00
2021-04-27 03:50:31 +08:00
void sendNEC ( uint32_t aRawData ,
uint8_t nbits )
2022-12-15 08:34:02 +08:00
__attribute__ ( ( deprecated ( " This old function sends MSB first! Please use sendNECMSB() or sendNEC(aAddress, aCommand, aNumberOfRepeats). " ) ) ) {
2021-04-10 22:49:28 +08:00
sendNECMSB ( aRawData , nbits ) ;
}
2021-01-30 07:50:58 +08:00
void sendNECMSB ( uint32_t data , uint8_t nbits , bool repeat = false ) ;
2021-01-28 07:58:26 +08:00
void sendRC5 ( uint32_t data , uint8_t nbits ) ;
2021-03-04 07:54:25 +08:00
void sendRC5ext ( uint8_t addr , uint8_t cmd , bool toggle ) ;
2022-11-30 05:06:08 +08:00
void sendRC6Raw ( uint32_t data , uint8_t nbits ) ;
void sendRC6 ( uint32_t data , uint8_t nbits ) __attribute__ ( ( deprecated ( " Please use sendRC6Raw(). " ) ) ) ;
void sendRC6Raw ( uint64_t data , uint8_t nbits ) ;
2023-02-12 20:02:01 +08:00
void sendRC6 ( uint64_t data , uint8_t nbits ) __attribute__ ( ( deprecated ( " Please use sendRC6Raw(). " ) ) ) ;
;
2021-01-28 07:58:26 +08:00
void sendSharpRaw ( unsigned long data , int nbits ) ;
2023-02-24 09:40:21 +08:00
void sendSharp ( uint16_t address , uint16_t command ) ;
2021-01-28 07:58:26 +08:00
void sendSAMSUNG ( unsigned long data , int nbits ) ;
__attribute__ ( ( deprecated ( " This old function sends MSB first! Please use sendSamsung(). " ) ) ) ;
void sendSony ( unsigned long data ,
int nbits )
__attribute__ ( ( deprecated ( " This old function sends MSB first! Please use sendSony(aAddress, aCommand, aNumberOfRepeats). " ) ) ) ;
;
2022-08-31 19:25:29 +08:00
void sendWhynter ( uint32_t aData , uint8_t aNumberOfBitsToSend ) ;
2021-01-28 07:58:26 +08:00
2022-01-27 01:36:50 +08:00
# if !defined(IR_SEND_PIN)
2021-01-28 07:58:26 +08:00
uint8_t sendPin ;
2021-11-03 13:57:27 +08:00
# endif
2023-02-24 09:40:21 +08:00
uint16_t periodTimeMicros ;
uint16_t periodOnTimeMicros ; // compensated with PULSE_CORRECTION_NANOS for duration of digitalWrite. Around 8 microseconds for 38 kHz.
uint16_t getPulseCorrectionNanos ( ) ;
2021-01-28 07:58:26 +08:00
2022-08-31 19:25:29 +08:00
static void customDelayMicroseconds ( unsigned long aMicroseconds ) ;
2021-01-28 07:58:26 +08:00
} ;
2021-03-09 04:38:06 +08:00
/*
2021-03-09 20:45:01 +08:00
* The sender instance
2021-03-09 04:38:06 +08:00
*/
2021-03-09 20:45:01 +08:00
extern IRsend IrSender ;
2021-01-28 07:58:26 +08:00
2022-08-31 19:25:29 +08:00
void sendNECSpecialRepeat ( ) ;
void sendLG2SpecialRepeat ( ) ;
void sendSamsungLGSpecialRepeat ( ) ;
2022-03-30 17:55:04 +08:00
# endif // _IR_REMOTE_INT_H