16 #include <linux/module.h>
26 #define RC6_UNIT 444444
27 #define RC6_HEADER_NBITS 4
28 #define RC6_0_NBITS 16
29 #define RC6_6A_32_NBITS 32
30 #define RC6_6A_NBITS 128
31 #define RC6_PREFIX_PULSE (6 * RC6_UNIT)
32 #define RC6_PREFIX_SPACE (2 * RC6_UNIT)
33 #define RC6_BIT_START (1 * RC6_UNIT)
34 #define RC6_BIT_END (1 * RC6_UNIT)
35 #define RC6_TOGGLE_START (2 * RC6_UNIT)
36 #define RC6_TOGGLE_END (2 * RC6_UNIT)
37 #define RC6_SUFFIX_SPACE (6 * RC6_UNIT)
38 #define RC6_MODE_MASK 0x07
39 #define RC6_STARTBIT_MASK 0x08
40 #define RC6_6A_MCE_TOGGLE_MASK 0x8000
41 #define RC6_6A_LCC_MASK 0xffff0000
42 #define RC6_6A_MCE_CC 0x800f0000
88 struct rc6_dec *
data = &dev->
raw->rc6;
95 if (!is_timing_event(ev)) {
105 IR_dprintk(2,
"RC6 decode started at state %i (%uus %s)\n",
111 switch (data->state) {
150 if (!is_transition(&ev, &dev->
raw->prev_ev))
165 data->toggle = ev.
pulse;
170 if (!is_transition(&ev, &dev->
raw->prev_ev) ||
200 if (data->count++ <
CHAR_BIT *
sizeof data->body) {
215 if (!is_transition(&ev, &dev->
raw->prev_ev))
218 if (data->count == data->wanted_bits)
232 scancode = data->body;
233 toggle = data->toggle;
234 IR_dprintk(1,
"RC6(0) scancode 0x%04x (toggle: %u)\n",
238 if (data->count >
CHAR_BIT *
sizeof data->body) {
239 IR_dprintk(1,
"RC6 too many (%u) data bits\n",
244 scancode = data->body;
253 IR_dprintk(1,
"RC6(6A) scancode 0x%08x (toggle: %u)\n",
267 IR_dprintk(1,
"RC6 decode failed at state %i (%uus %s)\n",
275 .decode = ir_rc6_decode,
278 static int __init ir_rc6_decode_init(
void)
286 static void __exit ir_rc6_decode_exit(
void)