Go to the documentation of this file.
32 #ifndef _IR_PROTOCOL_H
33 #define _IR_PROTOCOL_H
48 #if !defined(NO_DECODER) // for sending raw only
49 # if (!(defined(DECODE_DENON) || defined(DECODE_JVC) || defined(DECODE_KASEIKYO) \
50 || defined(DECODE_PANASONIC) || defined(DECODE_LG) || defined(DECODE_NEC) || defined(DECODE_ONKYO) || defined(DECODE_SAMSUNG) \
51 || defined(DECODE_SONY) || defined(DECODE_RC5) || defined(DECODE_RC6) \
52 || defined(DECODE_DISTANCE_WIDTH) || defined(DECODE_HASH) || defined(DECODE_BOSEWAVE) \
53 || defined(DECODE_LEGO_PF) || defined(DECODE_MAGIQUEST) || defined(DECODE_WHYNTER) || defined(DECODE_MARANTZ) || defined(DECODE_FAST) \
54 || defined(DECODE_OPENLASIR)))
58 #define DECODE_DENON // Includes Sharp
60 #define DECODE_KASEIKYO
61 #define DECODE_PANASONIC // alias for DECODE_KASEIKYO
63 #define DECODE_NEC // Includes Apple and Onkyo
64 #define DECODE_SAMSUNG
69 # if !defined(EXCLUDE_EXOTIC_PROTOCOLS) // saves around 2000 bytes program memory
70 #define DECODE_BOSEWAVE
71 #define DECODE_LEGO_PF
72 #define DECODE_MAGIQUEST
73 #define DECODE_WHYNTER
74 #define DECODE_MARANTZ
76 #define DECODE_OPENLASIR // Modified NEC with 8-bit validated address + 16-bit command
79 # if !defined(EXCLUDE_UNIVERSAL_PROTOCOLS)
80 #define DECODE_DISTANCE_WIDTH // universal decoder for pulse distance width protocols - requires up to 750 bytes additional program memory
81 #define DECODE_HASH // special decoder for all protocols - requires up to 250 bytes additional program memory
84 #endif // !defined(NO_DECODER)
88 #if defined(DECODE_NEC) && !(~(~DECODE_NEC + 0) == 0 && ~(~DECODE_NEC + 1) == 1)
89 #warning "The macros DECODE_XXX no longer require a value. Decoding is now switched by defining / non defining the macro."
98 UNKNOWN = 0,
PULSE_WIDTH,
PULSE_DISTANCE,
APPLE,
DENON,
JVC,
LG,
LG2,
NEC,
NEC2,
99 ONKYO,
PANASONIC,
KASEIKYO,
KASEIKYO_DENON,
KASEIKYO_SHARP,
KASEIKYO_JVC,
KASEIKYO_MITSUBISHI,
RC5,
RC6,
RC6A,
108 #define SIRCS_12_PROTOCOL 12
109 #define SIRCS_15_PROTOCOL 15
110 #define SIRCS_20_PROTOCOL 20
124 #define IRDATA_FLAGS_EMPTY 0x00
125 #define IRDATA_FLAGS_IS_REPEAT 0x01
126 #define IRDATA_FLAGS_IS_AUTO_REPEAT 0x02
127 #define IRDATA_FLAGS_PARITY_FAILED 0x04
128 #define IRDATA_FLAGS_TOGGLE_BIT 0x08
129 #define IRDATA_TOGGLE_BIT_MASK 0x08
130 #define IRDATA_FLAGS_EXTRA_INFO 0x10
131 #define IRDATA_FLAGS_IS_PROTOCOL_WITH_DIFFERENT_REPEAT 0x20
132 #define IRDATA_FLAGS_WAS_OVERFLOW 0x40
133 #define IRDATA_FLAGS_IS_MSB_FIRST 0x80
134 #define IRDATA_FLAGS_IS_LSB_FIRST 0x00
135 #define IRDATA_FLAGS_LSB_MSB_FIRST_MASK IRDATA_FLAGS_IS_MSB_FIRST
151 #define PROTOCOL_IS_PULSE_DISTANCE 0x00
152 #define PROTOCOL_IS_PULSE_DISTANCE_WIDTH 0x00 // Can often be decoded successfully as pulse distance
153 #define PROTOCOL_IS_PULSE_WIDTH 0x10 // Currently only Sony protocol
154 #define PROTOCOL_IS_PULSE_WIDTH_MASK PROTOCOL_IS_PULSE_WIDTH
155 #define SUPPRESS_STOP_BIT 0x20 // Stop bit is otherwise sent for all pulse distance protocols, i.e. aOneSpaceMicros != aZeroSpaceMicros.
156 #define PROTOCOL_IS_MSB_FIRST IRDATA_FLAGS_IS_MSB_FIRST
157 #define PROTOCOL_IS_LSB_FIRST IRDATA_FLAGS_IS_LSB_FIRST
158 #define PROTOCOL_IS_MSB_MASK IRDATA_FLAGS_IS_MSB_FIRST
163 #if !defined(BEO_KHZ) // guard used for unit test, which sends and receive Bang&Olufsen with 38 kHz.
167 #define BOSEWAVE_KHZ 38
172 #define OPENLASIR_KHZ 38
173 #define SAMSUNG_KHZ 38
174 #define KASEIKYO_KHZ 37
175 #define RC5_RC6_KHZ 36
189 #endif // _IR_PROTOCOL_H
uint16_t HeaderMarkMicros
void(* SpecialSendRepeatFunction)()
decode_type_t
An enum consisting of all supported formats.
uint8_t sLastSendToggleValue
decode_type_t ProtocolIndex
const char *const ProtocolNames[]
uint32_t bitreverse32Bit(uint32_t aInput)
DistanceWidthTimingInfoStruct DistanceWidthTimingInfo
uint8_t bitreverseOneByte(uint8_t aValue)
unsigned int RepeatPeriodMillis
uint_fast8_t FrequencyKHz
uint16_t HeaderSpaceMicros
const char * getProtocolString(decode_type_t aProtocol)