Skip to content

Commit

Permalink
V4L/DVB (13543): ir-common: Associate a table with a given protocol type
Browse files Browse the repository at this point in the history
While here, convert the protocol types into an enum
and define 0 as unknown.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 16, 2009
1 parent 8bea867 commit d30a3fe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions include/media/ir-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ extern int media_ir_debug; /* media_ir_debug level (0,1,2) */
#define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \
printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)

#define IR_TYPE_RC5 1
#define IR_TYPE_PD 2 /* Pulse distance encoded IR */
#define IR_TYPE_OTHER 99
enum ir_type {
IR_TYPE_UNKNOWN = 0,
IR_TYPE_RC5 = 1,
IR_TYPE_PD = 2, /* Pulse distance encoded IR */
IR_TYPE_NEC = 3,
IR_TYPE_OTHER = 99,
};

struct ir_scancode {
u16 scancode;
Expand All @@ -44,6 +48,7 @@ struct ir_scancode {
struct ir_scancode_table {
struct ir_scancode *scan;
int size;
enum ir_type ir_type;
spinlock_t lock;
};

Expand Down

0 comments on commit d30a3fe

Please sign in to comment.