Skip to content

Commit ace5fe7

Browse files
committed
add protocol bits definition for arduino
as they are defined only when using esp8266
1 parent bf7e4f1 commit ace5fe7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

ZgatewayIR.ino

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,35 @@
4343
IRsend irsend; //connect IR emitter pin to D9 on arduino, you need to comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library IRremote.h so as to free pin D3 for RF RECEIVER PIN
4444
#endif
4545

46+
// IR protocol bits definition for Arduino (for ESP9266 they are defined in IRRemoteESP8266.h)
47+
#ifndef NEC_BITS
48+
#define NEC_BITS 32U
49+
#endif
50+
#ifndef SAMSUNG_BITS
51+
#define SAMSUNG_BITS 32U
52+
#endif
53+
#ifndef SHARP_BITS
54+
#define SHARP_ADDRESS_BITS 5U
55+
#define SHARP_COMMAND_BITS 8U
56+
#define SHARP_BITS (SHARP_ADDRESS_BITS + SHARP_COMMAND_BITS + 2) // 15U
57+
#endif
58+
#ifndef RC5_BITS
59+
#define RC5_RAW_BITS 14U
60+
#define RC5_BITS RC5_RAW_BITS - 2U
61+
#endif
62+
#ifndef DISH_BITS
63+
#define DISH_BITS 16U
64+
#endif
65+
#ifndef SONY_12_BITS
66+
#define SONY_12_BITS 12U
67+
#endif
68+
#ifndef LG_BITS
69+
#define LG_BITS 28U
70+
#endif
71+
#ifndef WHYNTER_BITS
72+
#define WHYNTER_BITS 32U
73+
#endif
74+
4675
void setupIR()
4776
{
4877

0 commit comments

Comments
 (0)