Go to the documentation of this file.
14 #define AIWA_RC_T501_HZ 38
15 #define AIWA_RC_T501_BITS 15
16 #define AIWA_RC_T501_PRE_BITS 26
17 #define AIWA_RC_T501_POST_BITS 1
18 #define AIWA_RC_T501_SUM_BITS (AIWA_RC_T501_PRE_BITS + AIWA_RC_T501_BITS + AIWA_RC_T501_POST_BITS)
19 #define AIWA_RC_T501_HDR_MARK 8800
20 #define AIWA_RC_T501_HDR_SPACE 4500
21 #define AIWA_RC_T501_BIT_MARK 500
22 #define AIWA_RC_T501_ONE_SPACE 600
23 #define AIWA_RC_T501_ZERO_SPACE 1700
28 unsigned long pre = 0x0227EEC0;
38 for (
unsigned long mask = 1UL << (26 - 1); mask; mask >>= 1) {
54 for (
int i = 0; i < 15; i++) {
56 if (code & 0x80000000)
75 #if DECODE_AIWA_RC_T501
78 unsigned int offset = 1;
106 data = (data << 1) | 1;
108 data = (data << 1) | 0;
115 results->
bits = (offset - 1) / 2;
116 if (results->
bits < 42) {
120 results->
value = data;
Results returned from the decoder.
#define AIWA_RC_T501_ZERO_SPACE
#define AIWA_RC_T501_HDR_MARK
int bits
Number of bits in decoded value.
volatile unsigned int * rawbuf
Raw intervals in 50uS ticks.
void mark(unsigned int usec)
void enableIROut(int khz)
#define AIWA_RC_T501_BIT_MARK
decode_type_t decode_type
UNKNOWN, NEC, SONY, RC5, ...
int MATCH_SPACE(int measured_ticks, int desired_us)
volatile irparams_t irparams
Allow all parts of the code access to the ISR data NB.
#define AIWA_RC_T501_ONE_SPACE
#define AIWA_RC_T501_SUM_BITS
Public API to the library.
void space(unsigned int usec)
unsigned long value
Decoded value [max 32-bits].
int MATCH_MARK(int measured_ticks, int desired_us)
#define AIWA_RC_T501_HDR_SPACE
void sendAiwaRCT501(int code)
unsigned int rawlen
counter of entries in rawbuf