IRremote
IRProtocol.h File Reference

Common declarations for receiving and sending. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PulseDistanceWidthProtocolConstants
 
struct  IRData
 Data structure for the user application, available as decodedIRData. More...
 

Macros

#define IRDATA_FLAGS_EMPTY   0x00
 
#define IRDATA_FLAGS_IS_REPEAT   0x01
 
#define IRDATA_FLAGS_IS_AUTO_REPEAT   0x02
 
#define IRDATA_FLAGS_PARITY_FAILED   0x04
 the current (autorepeat) frame violated parity check More...
 
#define IRDATA_FLAGS_TOGGLE_BIT   0x08
 is set if RC5 or RC6 toggle bit is set More...
 
#define IRDATA_FLAGS_EXTRA_INFO   0x10
 There is extra info not contained in address and data (e.g. Kaseikyo unknown vendor ID, or in decodedRawDataArray) More...
 
#define IRDATA_FLAGS_WAS_OVERFLOW   0x40
 irparams.rawlen is set to 0 in this case to avoid endless OverflowFlag More...
 
#define IRDATA_FLAGS_IS_MSB_FIRST   0x80
 Value is mainly determined by the (known) protocol. More...
 
#define IRDATA_FLAGS_IS_LSB_FIRST   0x00
 
#define IRDATA_TOGGLE_BIT_MASK   0x08
 is set if RC5 or RC6 toggle bit is set More...
 
#define RAW_DATA_ARRAY_SIZE   ((((RAW_BUFFER_LENGTH - 2) - 1) / 64) + 1)
 
#define PROTOCOL_IS_LSB_FIRST   false
 
#define PROTOCOL_IS_MSB_FIRST   true
 
#define BEO_KHZ   455
 
#define SONY_KHZ   40
 
#define BOSEWAVE_KHZ   38
 
#define DENON_KHZ   38
 
#define JVC_KHZ   38
 
#define LG_KHZ   38
 
#define NEC_KHZ   38
 
#define SAMSUNG_KHZ   38
 
#define KASEIKYO_KHZ   37
 
#define RC5_RC6_KHZ   36
 

Enumerations

enum  decode_type_t {
  UNKNOWN = 0, PULSE_WIDTH, PULSE_DISTANCE, APPLE,
  DENON, JVC, LG, LG2,
  NEC, NEC2, ONKYO, PANASONIC,
  KASEIKYO, KASEIKYO_DENON, KASEIKYO_SHARP, KASEIKYO_JVC,
  KASEIKYO_MITSUBISHI, RC5, RC6, SAMSUNG,
  SAMSUNG48, SAMSUNG_LG, SHARP, SONY,
  BANG_OLUFSEN, BOSEWAVE, LEGO_PF, MAGIQUEST,
  WHYNTER
}
 An enum consisting of all supported formats. More...
 

Functions

const char * getProtocolString (decode_type_t aProtocol)
 
void printIRResultShort (Print *aSerial, IRData *aIRDataPtr, bool aPrintGap)
 Function to print decoded result and flags in one line. More...
 
uint8_t bitreverseOneByte (uint8_t aValue)
 
uint32_t bitreverse32Bit (uint32_t aInput)
 

Detailed Description

Common declarations for receiving and sending.

This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.

MIT License

Copyright (c) 2020-2022 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.

Definition in file IRProtocol.h.

Macro Definition Documentation

◆ BEO_KHZ

#define BEO_KHZ   455

Definition at line 137 of file IRProtocol.h.

◆ BOSEWAVE_KHZ

#define BOSEWAVE_KHZ   38

Definition at line 140 of file IRProtocol.h.

◆ DENON_KHZ

#define DENON_KHZ   38

Definition at line 141 of file IRProtocol.h.

◆ IRDATA_FLAGS_EMPTY

#define IRDATA_FLAGS_EMPTY   0x00

Definition at line 94 of file IRProtocol.h.

◆ IRDATA_FLAGS_EXTRA_INFO

#define IRDATA_FLAGS_EXTRA_INFO   0x10

There is extra info not contained in address and data (e.g. Kaseikyo unknown vendor ID, or in decodedRawDataArray)

Definition at line 99 of file IRProtocol.h.

◆ IRDATA_FLAGS_IS_AUTO_REPEAT

#define IRDATA_FLAGS_IS_AUTO_REPEAT   0x02

Definition at line 96 of file IRProtocol.h.

◆ IRDATA_FLAGS_IS_LSB_FIRST

#define IRDATA_FLAGS_IS_LSB_FIRST   0x00

Definition at line 102 of file IRProtocol.h.

◆ IRDATA_FLAGS_IS_MSB_FIRST

#define IRDATA_FLAGS_IS_MSB_FIRST   0x80

Value is mainly determined by the (known) protocol.

Definition at line 101 of file IRProtocol.h.

◆ IRDATA_FLAGS_IS_REPEAT

#define IRDATA_FLAGS_IS_REPEAT   0x01

Definition at line 95 of file IRProtocol.h.

◆ IRDATA_FLAGS_PARITY_FAILED

#define IRDATA_FLAGS_PARITY_FAILED   0x04

the current (autorepeat) frame violated parity check

Definition at line 97 of file IRProtocol.h.

◆ IRDATA_FLAGS_TOGGLE_BIT

#define IRDATA_FLAGS_TOGGLE_BIT   0x08

is set if RC5 or RC6 toggle bit is set

Definition at line 98 of file IRProtocol.h.

◆ IRDATA_FLAGS_WAS_OVERFLOW

#define IRDATA_FLAGS_WAS_OVERFLOW   0x40

irparams.rawlen is set to 0 in this case to avoid endless OverflowFlag

Definition at line 100 of file IRProtocol.h.

◆ IRDATA_TOGGLE_BIT_MASK

#define IRDATA_TOGGLE_BIT_MASK   0x08

is set if RC5 or RC6 toggle bit is set

Definition at line 105 of file IRProtocol.h.

◆ JVC_KHZ

#define JVC_KHZ   38

Definition at line 142 of file IRProtocol.h.

◆ KASEIKYO_KHZ

#define KASEIKYO_KHZ   37

Definition at line 146 of file IRProtocol.h.

◆ LG_KHZ

#define LG_KHZ   38

Definition at line 143 of file IRProtocol.h.

◆ NEC_KHZ

#define NEC_KHZ   38

Definition at line 144 of file IRProtocol.h.

◆ PROTOCOL_IS_LSB_FIRST

#define PROTOCOL_IS_LSB_FIRST   false

Definition at line 130 of file IRProtocol.h.

◆ PROTOCOL_IS_MSB_FIRST

#define PROTOCOL_IS_MSB_FIRST   true

Definition at line 131 of file IRProtocol.h.

◆ RAW_DATA_ARRAY_SIZE

#define RAW_DATA_ARRAY_SIZE   ((((RAW_BUFFER_LENGTH - 2) - 1) / 64) + 1)

Definition at line 108 of file IRProtocol.h.

◆ RC5_RC6_KHZ

#define RC5_RC6_KHZ   36

Definition at line 147 of file IRProtocol.h.

◆ SAMSUNG_KHZ

#define SAMSUNG_KHZ   38

Definition at line 145 of file IRProtocol.h.

◆ SONY_KHZ

#define SONY_KHZ   40

Definition at line 139 of file IRProtocol.h.

Enumeration Type Documentation

◆ decode_type_t

An enum consisting of all supported formats.

You do NOT need to remove entries from this list when disabling protocols! !!!Must be the same order as ProtocolNames in IRReceive.hpp!!!

Enumerator
UNKNOWN 
PULSE_WIDTH 
PULSE_DISTANCE 
APPLE 
DENON 
JVC 
LG 
LG2 
NEC 
NEC2 
ONKYO 
PANASONIC 
KASEIKYO 
KASEIKYO_DENON 
KASEIKYO_SHARP 
KASEIKYO_JVC 
KASEIKYO_MITSUBISHI 
RC5 
RC6 
SAMSUNG 
SAMSUNG48 
SAMSUNG_LG 
SHARP 
SONY 
BANG_OLUFSEN 
BOSEWAVE 
LEGO_PF 
MAGIQUEST 
WHYNTER 

Definition at line 40 of file IRProtocol.h.