-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathIRsmallDProtocolStructs.h
49 lines (41 loc) · 1.05 KB
/
IRsmallDProtocolStructs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* IRsmallDProtocolStructs - Protocol's Specific Data Structures
*
* This file is part of the IRsmallDecoder library for Arduino
* Copyright (c) 2020 Luis Carvalho
*/
#ifndef IRsmallD_ProtocolStructs_h
#define IRsmallD_ProtocolStructs_h
#if defined(IR_SMALLD_NEC) || defined(IR_SMALLD_RC5) || defined(IR_SMALLD_SAMSUNG32)
struct irSmallD_t {
uint8_t addr;
uint8_t cmd;
bool keyHeld;
};
#elif defined(IR_SMALLD_NECx) || defined(IR_SMALLD_SAMSUNG)
struct irSmallD_t {
uint16_t addr;
uint8_t cmd;
bool keyHeld;
};
#elif defined(IR_SMALLD_SIRC12) || defined(IR_SMALLD_SIRC15)
struct irSmallD_t {
uint8_t addr;
uint8_t cmd;
};
#elif defined(IR_SMALLD_SIRC20)
struct irSmallD_t {
uint8_t ext; //extended data
uint8_t addr;
uint8_t cmd;
};
#elif defined(IR_SMALLD_SIRC)
struct irSmallD_t {
uint8_t ext;
uint8_t addr;
uint8_t cmd;
bool keyHeld;
};
#else
#error Protocol data structure not defined.
#endif
#endif