24 #include <linux/module.h>
28 #define CHECK_RC5X_NBITS 8
29 #define RC5_UNIT 888888
30 #define RC5_BIT_START (1 * RC5_UNIT)
31 #define RC5_BIT_END (1 * RC5_UNIT)
32 #define RC5X_SPACE (4 * RC5_UNIT)
51 struct rc5_dec *
data = &dev->
raw->rc5;
58 if (!is_timing_event(ev)) {
68 IR_dprintk(2,
"RC5(x) decode started at state %i (%uus %s)\n",
74 switch (data->state) {
99 if (!is_transition(&ev, &dev->
raw->prev_ev))
102 if (data->count == data->wanted_bits)
131 xdata = (data->bits & 0x0003F) >> 0;
132 command = (data->bits & 0x00FC0) >> 6;
133 system = (data->bits & 0x1F000) >> 12;
134 toggle = (data->bits & 0x20000) ? 1 : 0;
135 command += (data->bits & 0x01000) ? 0 : 0x40;
136 scancode = system << 16 | command << 8 | xdata;
138 IR_dprintk(1,
"RC5X scancode 0x%06x (toggle: %u)\n",
144 command = (data->bits & 0x0003F) >> 0;
145 system = (data->bits & 0x007C0) >> 6;
146 toggle = (data->bits & 0x00800) ? 1 : 0;
147 command += (data->bits & 0x01000) ? 0 : 0x40;
148 scancode = system << 8 |
command;
150 IR_dprintk(1,
"RC5 scancode 0x%04x (toggle: %u)\n",
160 IR_dprintk(1,
"RC5(x) decode failed at state %i (%uus %s)\n",
168 .decode = ir_rc5_decode,
171 static int __init ir_rc5_decode_init(
void)
179 static void __exit ir_rc5_decode_exit(
void)