mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
V4L/DVB: ir-core: change duration to be coded as a u32 integer
This patch implements the agreed upon 1:31 integer encoded pulse/duration struct for ir-core raw decoders. All decoders have been tested after the change. Comments are welcome. Signed-off-by: David Härdeman <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
21677cfc56
commit
e40b1127f9
6 changed files with 285 additions and 256 deletions
|
|
@ -128,9 +128,21 @@ u32 ir_g_keycode_from_table(struct input_dev *input_dev, u32 scancode);
|
|||
|
||||
/* From ir-raw-event.c */
|
||||
|
||||
void ir_raw_event_handle(struct input_dev *input_dev);
|
||||
int ir_raw_event_store(struct input_dev *input_dev, s64 duration);
|
||||
int ir_raw_event_store_edge(struct input_dev *input_dev, enum raw_event_type type);
|
||||
struct ir_raw_event {
|
||||
unsigned pulse:1;
|
||||
unsigned duration:31;
|
||||
};
|
||||
|
||||
#define IR_MAX_DURATION 0x7FFFFFFF /* a bit more than 2 seconds */
|
||||
|
||||
void ir_raw_event_handle(struct input_dev *input_dev);
|
||||
int ir_raw_event_store(struct input_dev *input_dev, struct ir_raw_event *ev);
|
||||
int ir_raw_event_store_edge(struct input_dev *input_dev, enum raw_event_type type);
|
||||
static inline void ir_raw_event_reset(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_raw_event ev = { .pulse = false, .duration = 0 };
|
||||
ir_raw_event_store(input_dev, &ev);
|
||||
ir_raw_event_handle(input_dev);
|
||||
}
|
||||
|
||||
#endif /* _IR_CORE */
|
||||
|
|
|
|||
Loading…
Reference in a new issue