Go to the documentation of this file.
12 #define SONY_HDR_MARK 2400
13 #define SONY_HDR_SPACE 600
14 #define SONY_ONE_MARK 1200
15 #define SONY_ZERO_MARK 600
16 #define SONY_RPT_LENGTH 45000
17 #define SONY_DOUBLE_SPACE_USECS 500 // usually see 713 - not using ticks as get number wrap around
30 for (
unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
48 unsigned int offset = 0;
84 data = (data << 1) | 1;
86 data = (data << 1) | 0;
94 results->
bits = (offset - 1) / 2;
95 if (results->
bits < 12) {
99 results->
value = data;
Results returned from the decoder.
int bits
Number of bits in decoded value.
#define SONY_DOUBLE_SPACE_USECS
volatile unsigned int * rawbuf
Raw intervals in 50uS ticks.
void mark(unsigned int usec)
void enableIROut(int khz)
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.
void sendSony(unsigned long data, int nbits)
Public API to the library.
void space(unsigned int usec)
#define REPEAT
Decoded value for NEC when a repeat code is received.
unsigned long value
Decoded value [max 32-bits].
int MATCH_MARK(int measured_ticks, int desired_us)
unsigned int rawlen
counter of entries in rawbuf