Added possibility to exclude non-necessary libraries by comment lines in IRremote.h

This commit is contained in:
sstefanov
2015-03-12 14:49:48 +02:00
parent 0de2d18bdb
commit 549d92d2f5
2 changed files with 127 additions and 2 deletions

View File

@@ -34,6 +34,20 @@ public:
int rawlen; // Number of records in rawbuf.
};
// Send types
#define IRsendNEC
#define IRsendSONY
#define IRsendRC5
#define IRsendRC6
#define IRsendDISH
#define IRsendSHARP
#define IRsendPANASONIC
#define IRsendJVC
#define IRsendSANYO
#define IRsendMITSUBISHI
#define IRsendSAMSUNG
#define IRsendRAW
// Values for decode_type
#define NEC 1
#define SONY 2
@@ -63,15 +77,33 @@ public:
private:
// These are called by decode
int getRClevel(decode_results *results, int *offset, int *used, int t1);
#ifdef NEC
long decodeNEC(decode_results *results);
#endif
#ifdef SONY
long decodeSony(decode_results *results);
#endif
#ifdef SANYO
long decodeSanyo(decode_results *results);
#endif
#ifdef MITSUBISHI
long decodeMitsubishi(decode_results *results);
#endif
#ifdef RC5
long decodeRC5(decode_results *results);
#endif
#ifdef RC6
long decodeRC6(decode_results *results);
#endif
#ifdef PANASONIC
long decodePanasonic(decode_results *results);
#endif
#ifdef JVC
long decodeJVC(decode_results *results);
#endif
#ifdef SAMSUNG
long decodeSAMSUNG(decode_results *results);
#endif
long decodeHash(decode_results *results);
int compare(unsigned int oldval, unsigned int newval);
@@ -89,20 +121,40 @@ class IRsend
{
public:
IRsend() {}
#ifdef IRsendNEC
void sendNEC(unsigned long data, int nbits);
#endif
#ifdef IRsendSONY
void sendSony(unsigned long data, int nbits);
// Neither Sanyo nor Mitsubishi send is implemented yet
// void sendSanyo(unsigned long data, int nbits);
// void sendMitsubishi(unsigned long data, int nbits);
#endif
#ifdef IRsendRAW
void sendRaw(unsigned int buf[], int len, int hz);
#endif
#ifdef IRsendRC5
void sendRC5(unsigned long data, int nbits);
#endif
#ifdef IRsendRC6
void sendRC6(unsigned long data, int nbits);
#endif
#ifdef IRsendDISH
void sendDISH(unsigned long data, int nbits);
#endif
#ifdef IRsendSHARP
void sendSharp(unsigned long data, int nbits);
#endif
#ifdef IRsendPANASONIC
void sendPanasonic(unsigned int address, unsigned long data);
#endif
#ifdef IRsendJVC
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.
// private:
#endif
#ifdef IRsendSAMSUNG
void sendSAMSUNG(unsigned long data, int nbits);
#endif
void enableIROut(int khz);
VIRTUAL void mark(int usec);
VIRTUAL void space(int usec);