Go to the documentation of this file.
32 #ifndef _IR_PROTOCOL_H
33 #define _IR_PROTOCOL_H
74 #define SIRCS_12_PROTOCOL 12
75 #define SIRCS_15_PROTOCOL 15
76 #define SIRCS_20_PROTOCOL 20
90 #define IRDATA_FLAGS_EMPTY 0x00
91 #define IRDATA_FLAGS_IS_REPEAT 0x01
92 #define IRDATA_FLAGS_IS_AUTO_REPEAT 0x02
93 #define IRDATA_FLAGS_PARITY_FAILED 0x04
94 #define IRDATA_FLAGS_TOGGLE_BIT 0x08
95 #define IRDATA_TOGGLE_BIT_MASK 0x08
96 #define IRDATA_FLAGS_EXTRA_INFO 0x10
97 #define IRDATA_FLAGS_IS_PROTOCOL_WITH_DIFFERENT_REPEAT 0x20
98 #define IRDATA_FLAGS_WAS_OVERFLOW 0x40
99 #define IRDATA_FLAGS_IS_MSB_FIRST 0x80
100 #define IRDATA_FLAGS_IS_LSB_FIRST 0x00
102 #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.
113 #if defined(DECODE_DISTANCE_WIDTH)
122 #if RAW_BUFFER_LENGTH <= 254 // saves around 75 bytes program memory and speeds up ISR
144 #define SUPPRESS_STOP_BIT_FOR_THIS_DATA 0x20
145 #define PROTOCOL_IS_MSB_FIRST IRDATA_FLAGS_IS_MSB_FIRST
146 #define PROTOCOL_IS_LSB_FIRST IRDATA_FLAGS_IS_LSB_FIRST
148 #define SEND_STOP_BIT true
149 #define SEND_NO_STOP_BIT false
154 #if !defined(BEO_KHZ) // guard used for unit test, which sends and receive Bang&Olufsen with 38 kHz.
158 #define BOSEWAVE_KHZ 38
163 #define SAMSUNG_KHZ 38
164 #define KASEIKYO_KHZ 37
165 #define RC5_RC6_KHZ 36
180 #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)
uint_fast8_t rawlen
counter of entries in rawbuf
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.
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.
uint16_t initialGap
rawbuf[0] contains the initial gap of the last frame.
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
unsigned int RepeatPeriodMillis
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
uint_fast8_t FrequencyKHz
uint16_t HeaderSpaceMicros
const char * getProtocolString(decode_type_t aProtocol)