24 #include <linux/module.h>
28 #define SANYO_NBITS (13+13+8+8)
29 #define SANYO_UNIT 562500
30 #define SANYO_HEADER_PULSE (16 * SANYO_UNIT)
31 #define SANYO_HEADER_SPACE (8 * SANYO_UNIT)
32 #define SANYO_BIT_PULSE (1 * SANYO_UNIT)
33 #define SANYO_BIT_0_SPACE (1 * SANYO_UNIT)
34 #define SANYO_BIT_1_SPACE (3 * SANYO_UNIT)
35 #define SANYO_REPEAT_SPACE (150 * SANYO_UNIT)
36 #define SANYO_TRAILER_PULSE (1 * SANYO_UNIT)
37 #define SANYO_TRAILER_SPACE (10 * SANYO_UNIT)
57 struct sanyo_dec *
data = &dev->
raw->sanyo;
64 if (!is_timing_event(ev)) {
66 IR_dprintk(1,
"SANYO event reset received. reset to state 0\n");
72 IR_dprintk(2,
"SANYO decode started at state %d (%uus %s)\n",
75 switch (data->state) {
116 IR_dprintk(1,
"SANYO discarding last key repeat: event after key up\n");
156 address =
bitrev16((data->bits >> 29) & 0x1fff) >> 3;
158 command = bitrev8((data->bits >> 8) & 0xff);
159 not_command = bitrev8((data->bits >> 0) & 0xff);
161 if ((command ^ not_command) != 0xff) {
162 IR_dprintk(1,
"SANYO checksum error: received 0x%08Lx\n",
168 scancode = address << 8 |
command;
169 IR_dprintk(1,
"SANYO scancode: 0x%06x\n", scancode);
175 IR_dprintk(1,
"SANYO decode failed at count %d state %d (%uus %s)\n",
183 .decode = ir_sanyo_decode,
186 static int __init ir_sanyo_decode_init(
void)
194 static void __exit ir_sanyo_decode_exit(
void)