Go to the documentation of this file.
32 #ifndef _IR_PROTOCOL_H
33 #define _IR_PROTOCOL_H
75 #define SIRCS_12_PROTOCOL 12
76 #define SIRCS_15_PROTOCOL 15
77 #define SIRCS_20_PROTOCOL 20
91 #define IRDATA_FLAGS_EMPTY 0x00
92 #define IRDATA_FLAGS_IS_REPEAT 0x01
93 #define IRDATA_FLAGS_IS_AUTO_REPEAT 0x02
94 #define IRDATA_FLAGS_PARITY_FAILED 0x04
95 #define IRDATA_FLAGS_TOGGLE_BIT 0x08
96 #define IRDATA_TOGGLE_BIT_MASK 0x08
97 #define IRDATA_FLAGS_EXTRA_INFO 0x10
98 #define IRDATA_FLAGS_IS_PROTOCOL_WITH_DIFFERENT_REPEAT 0x20
99 #define IRDATA_FLAGS_WAS_OVERFLOW 0x40
100 #define IRDATA_FLAGS_IS_MSB_FIRST 0x80
101 #define IRDATA_FLAGS_IS_LSB_FIRST 0x00
103 #define RAW_DATA_ARRAY_SIZE ((((RAW_BUFFER_LENGTH - 2) - 1) / (2 * BITS_IN_RAW_DATA_TYPE)) + 1) // The -2 is for initial gap + stop bit mark, 128 mark + spaces for 64 bit.
114 #if defined(DECODE_DISTANCE_WIDTH)
146 #define SUPPRESS_STOP_BIT 0x20 // Stop bit is otherwise sent for all pulse distance protocols, i.e. aOneSpaceMicros != aZeroSpaceMicros.
147 #define PROTOCOL_IS_MSB_FIRST IRDATA_FLAGS_IS_MSB_FIRST
148 #define PROTOCOL_IS_LSB_FIRST IRDATA_FLAGS_IS_LSB_FIRST
153 #if !defined(BEO_KHZ) // guard used for unit test, which sends and receive Bang&Olufsen with 38 kHz.
157 #define BOSEWAVE_KHZ 38
162 #define SAMSUNG_KHZ 38
163 #define KASEIKYO_KHZ 37
164 #define RC5_RC6_KHZ 36
179 #endif // _IR_PROTOCOL_H
uint16_t address
Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << ...
uint16_t HeaderMarkMicros
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
uint32_t bitreverse32Bit(uint32_t aInput)
unsigned int IRRawlenType
void(* SpecialSendRepeatFunction)()
decode_type_t
An enum consisting of all supported formats.
decode_type_t ProtocolIndex
irparams_struct * rawDataPtr
Pointer of the raw timing data to be decoded. Mainly the OverflowFlag and the data buffer filled by r...
IRRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send functions.
This struct contains the data and control used for receiver static functions and the ISR (interrupt s...
void printIRResultShort(Print *aSerial, IRData *aIRDataPtr, bool aPrintGap)
Function to print decoded result and flags in one line.
const char *const ProtocolNames[]
Data structure for the user application, available as decodedIRData.
#define RAW_DATA_ARRAY_SIZE
uint8_t flags
IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above.
uint8_t bitreverseOneByte(uint8_t aValue)
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
uint16_t extra
Contains upper 16 bit of Magiquest WandID, Kaseikyo unknown vendor ID and Distance protocol (HeaderMa...
DistanceWidthTimingInfoStruct DistanceWidthTimingInfo
IRRawlenType rawlen
counter of entries in rawbuf of last received frame.
unsigned int RepeatPeriodMillis
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
uint_fast8_t FrequencyKHz
uint16_t HeaderSpaceMicros
uint16_t initialGapTicks
contains the initial gap (pre 4.4: the value in rawbuf[0]) of the last received frame.
const char * getProtocolString(decode_type_t aProtocol)