Go to the documentation of this file.
32 #ifndef _IR_PROTOCOL_H
33 #define _IR_PROTOCOL_H
47 #if !defined(NO_DECODER) // for sending raw only
48 # if (!(defined(DECODE_DENON) || defined(DECODE_JVC) || defined(DECODE_KASEIKYO) \
49 || defined(DECODE_PANASONIC) || defined(DECODE_LG) || defined(DECODE_NEC) || defined(DECODE_ONKYO) || defined(DECODE_SAMSUNG) \
50 || defined(DECODE_SONY) || defined(DECODE_RC5) || defined(DECODE_RC6) \
51 || defined(DECODE_DISTANCE_WIDTH) || defined(DECODE_HASH) || defined(DECODE_BOSEWAVE) \
52 || defined(DECODE_LEGO_PF) || defined(DECODE_MAGIQUEST) || defined(DECODE_FAST) || defined(DECODE_WHYNTER)))
56 #define DECODE_DENON // Includes Sharp
58 #define DECODE_KASEIKYO
59 #define DECODE_PANASONIC // alias for DECODE_KASEIKYO
61 #define DECODE_NEC // Includes Apple and Onkyo
62 #define DECODE_SAMSUNG
67 # if !defined(EXCLUDE_EXOTIC_PROTOCOLS) // saves around 2000 bytes program memory
68 #define DECODE_BOSEWAVE
69 #define DECODE_LEGO_PF
70 #define DECODE_MAGIQUEST
71 #define DECODE_WHYNTER
75 # if !defined(EXCLUDE_UNIVERSAL_PROTOCOLS)
76 #define DECODE_DISTANCE_WIDTH // universal decoder for pulse distance width protocols - requires up to 750 bytes additional program memory
77 #define DECODE_HASH // special decoder for all protocols - requires up to 250 bytes additional program memory
80 #endif // !defined(NO_DECODER)
84 #if defined(DECODE_NEC) && !(~(~DECODE_NEC + 0) == 0 && ~(~DECODE_NEC + 1) == 1)
85 #warning "The macros DECODE_XXX no longer require a value. Decoding is now switched by defining / non defining the macro."
130 #define SIRCS_12_PROTOCOL 12
131 #define SIRCS_15_PROTOCOL 15
132 #define SIRCS_20_PROTOCOL 20
146 #define IRDATA_FLAGS_EMPTY 0x00
147 #define IRDATA_FLAGS_IS_REPEAT 0x01
148 #define IRDATA_FLAGS_IS_AUTO_REPEAT 0x02
149 #define IRDATA_FLAGS_PARITY_FAILED 0x04
150 #define IRDATA_FLAGS_TOGGLE_BIT 0x08
151 #define IRDATA_TOGGLE_BIT_MASK 0x08
152 #define IRDATA_FLAGS_EXTRA_INFO 0x10
153 #define IRDATA_FLAGS_IS_PROTOCOL_WITH_DIFFERENT_REPEAT 0x20
154 #define IRDATA_FLAGS_WAS_OVERFLOW 0x40
155 #define IRDATA_FLAGS_IS_MSB_FIRST 0x80
156 #define IRDATA_FLAGS_IS_LSB_FIRST 0x00
157 #define IRDATA_FLAGS_LSB_MSB_FIRST_MASK IRDATA_FLAGS_IS_MSB_FIRST
173 #define PROTOCOL_IS_PULSE_DISTANCE 0x00
174 #define PROTOCOL_IS_PULSE_DISTANCE_WIDTH 0x00 // can often successfully be decoded as pulse distance
175 #define PROTOCOL_IS_PULSE_WIDTH 0x10
176 #define PROTOCOL_IS_PULSE_WIDTH_MASK PROTOCOL_IS_PULSE_WIDTH
177 #define SUPPRESS_STOP_BIT 0x20 // Stop bit is otherwise sent for all pulse distance protocols, i.e. aOneSpaceMicros != aZeroSpaceMicros.
178 #define PROTOCOL_IS_MSB_FIRST IRDATA_FLAGS_IS_MSB_FIRST
179 #define PROTOCOL_IS_LSB_FIRST IRDATA_FLAGS_IS_LSB_FIRST
180 #define PROTOCOL_IS_MSB_MASK IRDATA_FLAGS_IS_MSB_FIRST
185 #if !defined(BEO_KHZ) // guard used for unit test, which sends and receive Bang&Olufsen with 38 kHz.
189 #define BOSEWAVE_KHZ 38
194 #define SAMSUNG_KHZ 38
195 #define KASEIKYO_KHZ 37
196 #define RC5_RC6_KHZ 36
210 #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)