/**
* @file IRremoteInt.h
* @brief Contains all declarations required for the interface to IRremote.
* 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.
*
* This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
*
*
************************************************************************************
* MIT License
*
* Copyright (c) 2015-2026 Ken Shirriff http://www.righto.com, Rafi Khan, Armin Joachimsmeyer
*
* 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.
*
************************************************************************************
*/
#ifndef _IR_REMOTE_INT_H
#define _IR_REMOTE_INT_H
#include
#define SPACE 0
#define MARK 1
#define NO_MARK_OR_SPACE 2 // Used as return value for getBiphaselevel()
#if defined(PARTICLE)
#define F_CPU 16000000 // definition for a board for which F_CPU is not defined
#endif
#if defined(F_CPU) // F_CPU is used to generate the receive send timings in some CPU's
#define CLOCKS_PER_MICRO (F_CPU / MICROS_IN_ONE_SECOND)
#else
#define CLOCKS_PER_MICRO 48 // just a guess if F_CPU is not specified
#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
//#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.
/**
* The RAW_BUFFER_LENGTH determines the length of the byte buffer where the received IR timing data is stored before decoding.
* 100 is sufficient for standard protocols up to 48 bits, with 1 bit consisting of one mark and space plus 1 byte for initial gap, 2 bytes for header and 1 byte for stop bit.
* 48 bit protocols are PANASONIC, KASEIKYO, SAMSUNG48, RC6.
* 32 bit protocols like NEC, SAMSUNG, WHYNTER, SONY(20), LG(28) requires a buffer length of 68.
* 16 bit protocols like BOSEWAVE, DENON, FAST, JVC, LEGO_PF, RC5, SONY(12 or 15) requires a buffer length of 36.
* MAGIQUEST requires a buffer length of 112.
* Air conditioners often send a longer protocol data stream up to 750 bits.
* Default is 100 for 512 bytes RAM, 200 for 2k RAM and 750 for more than 2k RAM
*/
#if !defined(RAW_BUFFER_LENGTH)
# if (defined(RAMSIZE) && RAMSIZE