-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathRC5.h
More file actions
executable file
·33 lines (28 loc) · 728 Bytes
/
RC5.h
File metadata and controls
executable file
·33 lines (28 loc) · 728 Bytes
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
/*
* RC5 Arduino Library
* Guy Carpenter, Clearwater Software - 2013
*
* Licensed under the BSD2 license, see LICENSE for details.
*
* All text above must be included in any redistribution.
*/
#ifndef RC5_h
#define RC5_h
#include <Arduino.h>
class RC5
{
public:
unsigned char pin;
unsigned char state;
unsigned long time0;
unsigned long lastValue;
unsigned int bits;
unsigned int command;
RC5(unsigned char pin);
void reset();
bool read(unsigned int *message);
bool read(unsigned char *toggle, unsigned char *address, unsigned char *command);
void decodeEvent(unsigned char event);
void decodePulse(unsigned char signal, unsigned long period);
};
#endif // RC5_h