mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2026-01-07 13:52:47 +00:00
Merge pull request #124 from levsa/master
Added different ifdefs for SEND and DECODE. Enum for decode_type. ifdef errors fixed.
This commit is contained in:
77
IRremote.cpp
77
IRremote.cpp
@@ -74,7 +74,7 @@ int MATCH_SPACE(int measured_ticks, int desired_us) {return MATCH(measured_ticks
|
|||||||
// Debugging versions are in IRremote.cpp
|
// Debugging versions are in IRremote.cpp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEC
|
#ifdef SEND_NEC
|
||||||
void IRsend::sendNEC(unsigned long data, int nbits)
|
void IRsend::sendNEC(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -96,7 +96,7 @@ void IRsend::sendNEC(unsigned long data, int nbits)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WHYNTER
|
#ifdef SEND_WHYNTER
|
||||||
void IRsend::sendWhynter(unsigned long data, int nbits) {
|
void IRsend::sendWhynter(unsigned long data, int nbits) {
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
mark(WHYNTER_ZERO_MARK);
|
mark(WHYNTER_ZERO_MARK);
|
||||||
@@ -119,7 +119,7 @@ void IRsend::sendWhynter(unsigned long data, int nbits) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SONY
|
#ifdef SEND_SONY
|
||||||
void IRsend::sendSony(unsigned long data, int nbits) {
|
void IRsend::sendSony(unsigned long data, int nbits) {
|
||||||
enableIROut(40);
|
enableIROut(40);
|
||||||
mark(SONY_HDR_MARK);
|
mark(SONY_HDR_MARK);
|
||||||
@@ -153,6 +153,7 @@ void IRsend::sendRaw(unsigned int buf[], int len, int hz)
|
|||||||
space(0); // Just to be sure
|
space(0); // Just to be sure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SEND_RC5
|
||||||
// Note: first bit must be a one (start bit)
|
// Note: first bit must be a one (start bit)
|
||||||
void IRsend::sendRC5(unsigned long data, int nbits)
|
void IRsend::sendRC5(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
@@ -174,7 +175,9 @@ void IRsend::sendRC5(unsigned long data, int nbits)
|
|||||||
}
|
}
|
||||||
space(0); // Turn off at end
|
space(0); // Turn off at end
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SEND_RC6
|
||||||
// Caller needs to take care of flipping the toggle bit
|
// Caller needs to take care of flipping the toggle bit
|
||||||
void IRsend::sendRC6(unsigned long data, int nbits)
|
void IRsend::sendRC6(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
@@ -206,8 +209,9 @@ void IRsend::sendRC6(unsigned long data, int nbits)
|
|||||||
}
|
}
|
||||||
space(0); // Turn off at end
|
space(0); // Turn off at end
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PANASONIC
|
#ifdef SEND_PANASONIC
|
||||||
void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
|
void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
|
||||||
enableIROut(35);
|
enableIROut(35);
|
||||||
mark(PANASONIC_HDR_MARK);
|
mark(PANASONIC_HDR_MARK);
|
||||||
@@ -237,7 +241,7 @@ void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JVC
|
#ifdef SEND_JVC
|
||||||
void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
|
void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
|
||||||
{
|
{
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -262,7 +266,7 @@ void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SAMSUNG
|
#ifdef SEND_SAMSUNG
|
||||||
void IRsend::sendSAMSUNG(unsigned long data, int nbits)
|
void IRsend::sendSAMSUNG(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -454,7 +458,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
if (irparams.rcvstate != STATE_STOP) {
|
if (irparams.rcvstate != STATE_STOP) {
|
||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
#ifdef NEC
|
#ifdef DECODE_NEC
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting NEC decode");
|
Serial.println("Attempting NEC decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -463,7 +467,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SONY
|
#ifdef DECODE_SONY
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Sony decode");
|
Serial.println("Attempting Sony decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -472,7 +476,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SANYO
|
#ifdef DECODE_SANYO
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Sanyo decode");
|
Serial.println("Attempting Sanyo decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -481,7 +485,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MITSUBISHI
|
#ifdef DECODE_MITSUBISHI
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Mitsubishi decode");
|
Serial.println("Attempting Mitsubishi decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -490,7 +494,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RC5
|
#ifdef DECODE_RC5
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting RC5 decode");
|
Serial.println("Attempting RC5 decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -499,7 +503,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RC6
|
#ifdef DECODE_RC6
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting RC6 decode");
|
Serial.println("Attempting RC6 decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -508,7 +512,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PANASONIC
|
#ifdef DECODE_PANASONIC
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Panasonic decode");
|
Serial.println("Attempting Panasonic decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -517,13 +521,16 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JVC
|
#ifdef DECODE_LG
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting LG decode");
|
Serial.println("Attempting LG decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeLG(results)) {
|
if (decodeLG(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DECODE_JVC
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting JVC decode");
|
Serial.println("Attempting JVC decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -532,20 +539,24 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SAMSUNG
|
#ifdef DECODE_SAMSUNG
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting SAMSUNG decode");
|
Serial.println("Attempting SAMSUNG decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeSAMSUNG(results)) {
|
if (decodeSAMSUNG(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DECODE_WHYNTER
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Whynter decode");
|
Serial.println("Attempting Whynter decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeWhynter(results)) {
|
if (decodeWhynter(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
// Aiwa RC-T501
|
#endif
|
||||||
|
|
||||||
#ifdef AIWA_RC_T501
|
#ifdef AIWA_RC_T501
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Aiwa RC-T501 decode");
|
Serial.println("Attempting Aiwa RC-T501 decode");
|
||||||
@@ -566,7 +577,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEC
|
#ifdef DECODE_NEC
|
||||||
// NECs have a repeat only 4 items long
|
// NECs have a repeat only 4 items long
|
||||||
long IRrecv::decodeNEC(decode_results *results) {
|
long IRrecv::decodeNEC(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
@@ -617,7 +628,7 @@ long IRrecv::decodeNEC(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SONY
|
#ifdef DECODE_SONY
|
||||||
long IRrecv::decodeSony(decode_results *results) {
|
long IRrecv::decodeSony(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
if (irparams.rawlen < 2 * SONY_BITS + 2) {
|
if (irparams.rawlen < 2 * SONY_BITS + 2) {
|
||||||
@@ -631,7 +642,7 @@ long IRrecv::decodeSony(decode_results *results) {
|
|||||||
// Serial.print("IR Gap found: ");
|
// Serial.print("IR Gap found: ");
|
||||||
results->bits = 0;
|
results->bits = 0;
|
||||||
results->value = REPEAT;
|
results->value = REPEAT;
|
||||||
#ifdef SANYO
|
#ifdef DECODE_SANYO
|
||||||
results->decode_type = SANYO;
|
results->decode_type = SANYO;
|
||||||
#else
|
#else
|
||||||
results->decode_type = UNKNOWN;
|
results->decode_type = UNKNOWN;
|
||||||
@@ -675,6 +686,7 @@ long IRrecv::decodeSony(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DECODE_WHYNTER
|
||||||
long IRrecv::decodeWhynter(decode_results *results) {
|
long IRrecv::decodeWhynter(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
|
|
||||||
@@ -732,9 +744,9 @@ long IRrecv::decodeWhynter(decode_results *results) {
|
|||||||
results->decode_type = WHYNTER;
|
results->decode_type = WHYNTER;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DECODE_SANYO
|
||||||
#ifdef SANYO
|
|
||||||
// I think this is a Sanyo decoder - serial = SA 8650B
|
// I think this is a Sanyo decoder - serial = SA 8650B
|
||||||
// Looks like Sony except for timings, 48 chars of data and time/space different
|
// Looks like Sony except for timings, 48 chars of data and time/space different
|
||||||
long IRrecv::decodeSanyo(decode_results *results) {
|
long IRrecv::decodeSanyo(decode_results *results) {
|
||||||
@@ -800,7 +812,7 @@ long IRrecv::decodeSanyo(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MITSUBISHI
|
#ifdef DECODE_MITSUBISHI
|
||||||
// Looks like Sony except for timings, 48 chars of data and time/space different
|
// Looks like Sony except for timings, 48 chars of data and time/space different
|
||||||
long IRrecv::decodeMitsubishi(decode_results *results) {
|
long IRrecv::decodeMitsubishi(decode_results *results) {
|
||||||
// Serial.print("?!? decoding Mitsubishi:");Serial.print(irparams.rawlen); Serial.print(" want "); Serial.println( 2 * MITSUBISHI_BITS + 2);
|
// Serial.print("?!? decoding Mitsubishi:");Serial.print(irparams.rawlen); Serial.print(" want "); Serial.println( 2 * MITSUBISHI_BITS + 2);
|
||||||
@@ -911,8 +923,8 @@ int IRrecv::getRClevel(decode_results *results, int *offset, int *used, int t1)
|
|||||||
#endif
|
#endif
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#ifdef DECODE_RC5
|
||||||
long IRrecv::decodeRC5(decode_results *results) {
|
long IRrecv::decodeRC5(decode_results *results) {
|
||||||
if (irparams.rawlen < MIN_RC5_SAMPLES + 2) {
|
if (irparams.rawlen < MIN_RC5_SAMPLES + 2) {
|
||||||
return ERR;
|
return ERR;
|
||||||
@@ -947,7 +959,9 @@ long IRrecv::decodeRC5(decode_results *results) {
|
|||||||
results->decode_type = RC5;
|
results->decode_type = RC5;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DECODE_RC6
|
||||||
long IRrecv::decodeRC6(decode_results *results) {
|
long IRrecv::decodeRC6(decode_results *results) {
|
||||||
if (results->rawlen < MIN_RC6_SAMPLES) {
|
if (results->rawlen < MIN_RC6_SAMPLES) {
|
||||||
return ERR;
|
return ERR;
|
||||||
@@ -998,8 +1012,9 @@ long IRrecv::decodeRC6(decode_results *results) {
|
|||||||
results->decode_type = RC6;
|
results->decode_type = RC6;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PANASONIC
|
#ifdef DECODE_PANASONIC
|
||||||
long IRrecv::decodePanasonic(decode_results *results) {
|
long IRrecv::decodePanasonic(decode_results *results) {
|
||||||
unsigned long long data = 0;
|
unsigned long long data = 0;
|
||||||
int offset = 1;
|
int offset = 1;
|
||||||
@@ -1035,7 +1050,7 @@ long IRrecv::decodePanasonic(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LG
|
#ifdef DECODE_LG
|
||||||
long IRrecv::decodeLG(decode_results *results) {
|
long IRrecv::decodeLG(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
int offset = 1; // Skip first space
|
int offset = 1; // Skip first space
|
||||||
@@ -1083,7 +1098,7 @@ long IRrecv::decodeLG(decode_results *results) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JVC
|
#ifdef DECODE_JVC
|
||||||
long IRrecv::decodeJVC(decode_results *results) {
|
long IRrecv::decodeJVC(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
int offset = 1; // Skip first space
|
int offset = 1; // Skip first space
|
||||||
@@ -1137,7 +1152,7 @@ long IRrecv::decodeJVC(decode_results *results) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SAMSUNG
|
#ifdef DECODE_SAMSUNG
|
||||||
// SAMSUNGs have a repeat only 4 items long
|
// SAMSUNGs have a repeat only 4 items long
|
||||||
long IRrecv::decodeSAMSUNG(decode_results *results) {
|
long IRrecv::decodeSAMSUNG(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
@@ -1194,7 +1209,7 @@ long IRrecv::decodeSAMSUNG(decode_results *results) {
|
|||||||
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
|
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef AIWA_RC_T501
|
#ifdef DECODE_AIWA_RC_T501
|
||||||
long IRrecv::decodeAiwaRCT501(decode_results *results) {
|
long IRrecv::decodeAiwaRCT501(decode_results *results) {
|
||||||
int data = 0;
|
int data = 0;
|
||||||
int offset = 1; // skip first garbage read
|
int offset = 1; // skip first garbage read
|
||||||
@@ -1326,7 +1341,7 @@ i.e. use 0x1C10 instead of 0x0000000000001C10 which is listed in the
|
|||||||
linked LIRC file.
|
linked LIRC file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef IRsendSHARP
|
#ifdef SEND_SHARP
|
||||||
void IRsend::sendSharp(unsigned long data, int nbits) {
|
void IRsend::sendSharp(unsigned long data, int nbits) {
|
||||||
unsigned long invertdata = data ^ SHARP_TOGGLE_MASK;
|
unsigned long invertdata = data ^ SHARP_TOGGLE_MASK;
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -1360,7 +1375,7 @@ void IRsend::sendSharp(unsigned int address, unsigned int command) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IRsendDISH
|
#ifdef SEND_DISH
|
||||||
void IRsend::sendDISH(unsigned long data, int nbits)
|
void IRsend::sendDISH(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
enableIROut(56);
|
enableIROut(56);
|
||||||
@@ -1386,7 +1401,7 @@ void IRsend::sendDISH(unsigned long data, int nbits)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef AIWA_RC_T501
|
#ifdef SEND_AIWA_RC_T501
|
||||||
void IRsend::sendAiwaRCT501(int code) {
|
void IRsend::sendAiwaRCT501(int code) {
|
||||||
// PRE-DATA, 26 bits, 0x227EEC0
|
// PRE-DATA, 26 bits, 0x227EEC0
|
||||||
long int pre = 0x227EEC0;
|
long int pre = 0x227EEC0;
|
||||||
|
|||||||
91
IRremote.h
91
IRremote.h
@@ -25,10 +25,29 @@
|
|||||||
//#define DEBUG
|
//#define DEBUG
|
||||||
// #define TEST
|
// #define TEST
|
||||||
|
|
||||||
|
enum decode_type_t {
|
||||||
|
NEC = 1,
|
||||||
|
SONY = 2,
|
||||||
|
RC5 = 3,
|
||||||
|
RC6 = 4,
|
||||||
|
DISH = 5,
|
||||||
|
SHARP = 6,
|
||||||
|
PANASONIC = 7,
|
||||||
|
JVC = 8,
|
||||||
|
SANYO = 9,
|
||||||
|
MITSUBISHI = 10,
|
||||||
|
SAMSUNG = 11,
|
||||||
|
LG = 12,
|
||||||
|
WHYNTER = 13,
|
||||||
|
AIWA_RC_T501 = 14,
|
||||||
|
|
||||||
|
UNKNOWN = -1
|
||||||
|
};
|
||||||
|
|
||||||
// Results returned from the decoder
|
// Results returned from the decoder
|
||||||
class decode_results {
|
class decode_results {
|
||||||
public:
|
public:
|
||||||
int decode_type; // NEC, SONY, RC5, UNKNOWN
|
decode_type_t decode_type; // NEC, SONY, RC5, UNKNOWN
|
||||||
union { // This is used for decoding Panasonic and Sharp data
|
union { // This is used for decoding Panasonic and Sharp data
|
||||||
unsigned int panasonicAddress;
|
unsigned int panasonicAddress;
|
||||||
unsigned int sharpAddress;
|
unsigned int sharpAddress;
|
||||||
@@ -53,23 +72,6 @@ public:
|
|||||||
#define IRsendSAMSUNG
|
#define IRsendSAMSUNG
|
||||||
#define IRsendRAW
|
#define IRsendRAW
|
||||||
|
|
||||||
// Values for decode_type
|
|
||||||
#define NEC 1
|
|
||||||
#define SONY 2
|
|
||||||
#define RC5 3
|
|
||||||
#define RC6 4
|
|
||||||
#define DISH 5
|
|
||||||
#define SHARP 6
|
|
||||||
#define PANASONIC 7
|
|
||||||
#define JVC 8
|
|
||||||
#define SANYO 9
|
|
||||||
#define MITSUBISHI 10
|
|
||||||
#define SAMSUNG 11
|
|
||||||
#define LG 12
|
|
||||||
#define WHYNTER 13
|
|
||||||
#define AIWA_RC_T501 14
|
|
||||||
#define UNKNOWN -1
|
|
||||||
|
|
||||||
// Decoded value for NEC when a repeat code is received
|
// Decoded value for NEC when a repeat code is received
|
||||||
#define REPEAT 0xffffffff
|
#define REPEAT 0xffffffff
|
||||||
|
|
||||||
@@ -85,42 +87,42 @@ public:
|
|||||||
private:
|
private:
|
||||||
// These are called by decode
|
// These are called by decode
|
||||||
int getRClevel(decode_results *results, int *offset, int *used, int t1);
|
int getRClevel(decode_results *results, int *offset, int *used, int t1);
|
||||||
#ifdef NEC
|
#ifdef DECODE_NEC
|
||||||
long decodeNEC(decode_results *results);
|
long decodeNEC(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SONY
|
#ifdef DECODE_SONY
|
||||||
long decodeSony(decode_results *results);
|
long decodeSony(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SANYO
|
#ifdef DECODE_SANYO
|
||||||
long decodeSanyo(decode_results *results);
|
long decodeSanyo(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef MITSUBISHI
|
#ifdef DECODE_MITSUBISHI
|
||||||
long decodeMitsubishi(decode_results *results);
|
long decodeMitsubishi(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef RC5
|
#ifdef DECODE_RC5
|
||||||
long decodeRC5(decode_results *results);
|
long decodeRC5(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef RC6
|
#ifdef DECODE_RC6
|
||||||
long decodeRC6(decode_results *results);
|
long decodeRC6(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PANASONIC
|
#ifdef DECODE_PANASONIC
|
||||||
long decodePanasonic(decode_results *results);
|
long decodePanasonic(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef LG
|
#ifdef DECODE_LG
|
||||||
long decodeLG(decode_results *results);
|
long decodeLG(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef JVC
|
#ifdef DECODE_JVC
|
||||||
long decodeJVC(decode_results *results);
|
long decodeJVC(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SAMSUNG
|
#ifdef DECODE_SAMSUNG
|
||||||
long decodeSAMSUNG(decode_results *results);
|
long decodeSAMSUNG(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WHYNTER
|
#ifdef DECODE_WHYNTER
|
||||||
long decodeWhynter(decode_results *results);
|
long decodeWhynter(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef AIWA_RC_T501
|
#ifdef DECODE_AIWA_RC_T501
|
||||||
long decodeAiwaRCT501(decode_results *results);
|
long decodeAiwaRCT501(decode_results *results);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -141,41 +143,44 @@ class IRsend
|
|||||||
public:
|
public:
|
||||||
IRsend() {}
|
IRsend() {}
|
||||||
void sendRaw(unsigned int buf[], int len, int hz);
|
void sendRaw(unsigned int buf[], int len, int hz);
|
||||||
|
#ifdef SEND_RC5
|
||||||
void sendRC5(unsigned long data, int nbits);
|
void sendRC5(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
|
#ifdef SEND_RC6
|
||||||
void sendRC6(unsigned long data, int nbits);
|
void sendRC6(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
#ifdef WHYNTER
|
#ifdef SEND_WHYNTER
|
||||||
void sendWhynter(unsigned long data, int nbits);
|
void sendWhynter(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
#ifdef NEC
|
#ifdef SEND_NEC
|
||||||
void sendNEC(unsigned long data, int nbits);
|
void sendNEC(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SONY
|
#ifdef SEND_SONY
|
||||||
void sendSony(unsigned long data, int nbits);
|
void sendSony(unsigned long data, int nbits);
|
||||||
// Neither Sanyo nor Mitsubishi send is implemented yet
|
// Neither Sanyo nor Mitsubishi send is implemented yet
|
||||||
// void sendSanyo(unsigned long data, int nbits);
|
// void sendSanyo(unsigned long data, int nbits);
|
||||||
// void sendMitsubishi(unsigned long data, int nbits);
|
// void sendMitsubishi(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SEND_DISH
|
||||||
#ifdef DISH
|
|
||||||
void sendDISH(unsigned long data, int nbits);
|
void sendDISH(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SHARP
|
#ifdef SEND_SHARP
|
||||||
void sendSharp(unsigned int address, unsigned int command);
|
void sendSharp(unsigned int address, unsigned int command);
|
||||||
void sendSharpRaw(unsigned long data, int nbits);
|
void sendSharpRaw(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
#ifdef IRsendSHARP
|
#ifdef SEND_IRsendSHARP
|
||||||
void sendSharp(unsigned long data, int nbits);
|
void sendSharp(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PANASONIC
|
#ifdef SEND_PANASONIC
|
||||||
void sendPanasonic(unsigned int address, unsigned long data);
|
void sendPanasonic(unsigned int address, unsigned long data);
|
||||||
#endif
|
#endif
|
||||||
#ifdef JVC
|
#ifdef SEND_JVC
|
||||||
void sendJVC(unsigned long data, int nbits, int repeat); // *Note instead of sending the REPEAT constant if you want the JVC repeat signal sent, send the original code value and change the repeat argument from 0 to 1. JVC protocol repeats by skipping the header NOT by sending a separate code value like NEC does.
|
void sendJVC(unsigned long data, int nbits, int repeat); // *Note instead of sending the REPEAT constant if you want the JVC repeat signal sent, send the original code value and change the repeat argument from 0 to 1. JVC protocol repeats by skipping the header NOT by sending a separate code value like NEC does.
|
||||||
void sendAiwaRCT501(int code);
|
|
||||||
// private:
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef SAMSUNG
|
#ifdef SEND_AIWA_RC_T501
|
||||||
|
void sendAiwaRCT501(int code);
|
||||||
|
#endif
|
||||||
|
#ifdef SEND_SAMSUNG
|
||||||
void sendSAMSUNG(unsigned long data, int nbits);
|
void sendSAMSUNG(unsigned long data, int nbits);
|
||||||
#endif
|
#endif
|
||||||
void enableIROut(int khz);
|
void enableIROut(int khz);
|
||||||
|
|||||||
9
library.properties
Normal file
9
library.properties
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
name=IRremote
|
||||||
|
version=1.0
|
||||||
|
author=shirriff
|
||||||
|
maintainer=shirriff
|
||||||
|
sentence=Send and receive infrared signals with multiple protocols
|
||||||
|
paragraph=Send and receive infrared signals with multiple protocols
|
||||||
|
category=infrared
|
||||||
|
url=https://github.com/shirriff/Arduino-IRremote.git
|
||||||
|
architectures=*
|
||||||
Reference in New Issue
Block a user