diff --git a/utility/IRLibCPE.h b/utility/IRLibCPE.h index 4cf91f0..8845778 100644 --- a/utility/IRLibCPE.h +++ b/utility/IRLibCPE.h @@ -24,6 +24,7 @@ #include "IRLib_P10_DirecTV.h" #include "IRLib_P11_RCMM.h" #include "IRLib_P12_CYKM.h" +#include "IRLib_HashRaw.h" //include additional protocols here #include "IRLibCombo.h" #include "IRLibRecvPCI.h" diff --git a/utility/IRLibCombo.h b/utility/IRLibCombo.h index 91c32f0..25ceeb5 100644 --- a/utility/IRLibCombo.h +++ b/utility/IRLibCombo.h @@ -29,6 +29,7 @@ #ifndef IRLIB_HASHRAW_H #define IR_SEND_RAW + #define IR_SEND_RAW_ALIGNED #define IR_DECODE_HASH #define PV_IR_DECODE_HASH #define PV_IR_SEND_RAW @@ -245,6 +246,20 @@ class IRsend: IR_SEND_RAW //Must be last one. } } + + /* + * Sends raw IR data. + * The first parameter to the method is a pointer to the first element of an array of uint16_t values. + * These values are the raw timing values in microseconds. + * The second parameter is the length of the array presented as the first parameter. + * If the frequency to be used in transmission is not specified, it defaults to 38kHz. + */ + #ifdef IRLIB_HASHRAW_H + void sendRaw(uint16_t *buf, uint8_t len, uint8_t khz) { + if(khz==0)khz=38; + IR_SEND_RAW_ALIGNED + } + #endif //IRLIB_HASHRAW_H }; #endif //IRLIBSENDBASE_H diff --git a/utility/IRLib_HashRaw.h b/utility/IRLib_HashRaw.h index 95e84d9..58a9628 100644 --- a/utility/IRLib_HashRaw.h +++ b/utility/IRLib_HashRaw.h @@ -19,6 +19,7 @@ #ifndef IRLIB_HASHRAW_H #define IRLIB_HASHRAW_H #define IR_SEND_RAW case 0: IRsendRaw::send((uint16_t*)data,data2,khz); break; +#define IR_SEND_RAW_ALIGNED IRsendRaw::send(buf,len,khz); #define IR_DECODE_HASH if(IRdecodeHash::decode()) return true; #ifdef IRLIB_HAVE_COMBO #define PV_IR_DECODE_HASH ,public virtual IRdecodeHash