Linux Kernel
3.7.1
|
#include <linux/spinlock.h>
#include <linux/kfifo.h>
#include <linux/time.h>
#include <linux/timer.h>
#include <media/rc-map.h>
Go to the source code of this file.
Data Structures | |
struct | rc_dev |
struct | ir_raw_event |
Macros | |
#define | IR_dprintk(level, fmt,...) |
#define | to_rc_dev(d) container_of(d, struct rc_dev, dev) |
#define | DEFINE_IR_RAW_EVENT(event) |
#define | IR_MAX_DURATION 0xFFFFFFFF /* a bit more than 4 seconds */ |
#define | US_TO_NS(usec) ((usec) * 1000) |
#define | MS_TO_US(msec) ((msec) * 1000) |
#define | MS_TO_NS(msec) ((msec) * 1000 * 1000) |
Enumerations | |
enum | rc_driver_type { RC_DRIVER_SCANCODE = 0, RC_DRIVER_IR_RAW } |
enum | raw_event_type { IR_SPACE = (1 << 0), IR_PULSE = (1 << 1), IR_START_EVENT = (1 << 2), IR_STOP_EVENT = (1 << 3) } |
Functions | |
struct rc_dev * | rc_allocate_device (void) |
void | rc_free_device (struct rc_dev *dev) |
int | rc_register_device (struct rc_dev *dev) |
void | rc_unregister_device (struct rc_dev *dev) |
void | rc_repeat (struct rc_dev *dev) |
void | rc_keydown (struct rc_dev *dev, int scancode, u8 toggle) |
void | rc_keydown_notimeout (struct rc_dev *dev, int scancode, u8 toggle) |
void | rc_keyup (struct rc_dev *dev) |
u32 | rc_g_keycode_from_table (struct rc_dev *dev, u32 scancode) |
void | ir_raw_event_handle (struct rc_dev *dev) |
int | ir_raw_event_store (struct rc_dev *dev, struct ir_raw_event *ev) |
int | ir_raw_event_store_edge (struct rc_dev *dev, enum raw_event_type type) |
int | ir_raw_event_store_with_filter (struct rc_dev *dev, struct ir_raw_event *ev) |
void | ir_raw_event_set_idle (struct rc_dev *dev, bool idle) |
Variables | |
int | rc_core_debug |
#define DEFINE_IR_RAW_EVENT | ( | event | ) |
#define IR_MAX_DURATION 0xFFFFFFFF /* a bit more than 4 seconds */ |
enum raw_event_type |
enum rc_driver_type |
int ir_raw_event_store | ( | struct rc_dev * | dev, |
struct ir_raw_event * | ev | ||
) |
ir_raw_event_store() - pass a pulse/space duration to the raw ir decoders : the struct rc_dev device descriptor : the struct ir_raw_event descriptor of the pulse/space
This routine (which may be called from an interrupt context) stores a pulse/space duration for the raw ir decoding state machines. Pulses are signalled as positive values and spaces as negative values. A zero value will reset the decoding state machines.
int ir_raw_event_store_edge | ( | struct rc_dev * | dev, |
enum raw_event_type | type | ||
) |
ir_raw_event_store_edge() - notify raw ir decoders of the start of a pulse/space : the struct rc_dev device descriptor : the type of the event that has occurred
This routine (which may be called from an interrupt context) is used to store the beginning of an ir pulse or space (or the start/end of ir reception) for the raw ir decoding state machines. This is used by hardware which does not provide durations directly but only interrupts (or similar events) on state change.
int ir_raw_event_store_with_filter | ( | struct rc_dev * | dev, |
struct ir_raw_event * | ev | ||
) |
ir_raw_event_store_with_filter() - pass next pulse/space to decoders with some processing : the struct rc_dev device descriptor : the type of the event that has occurred
This routine (which may be called from an interrupt context) works in similar manner to ir_raw_event_store_edge. This routine is intended for devices with limited internal buffer It automerges samples of same type, and handles timeouts. Returns non-zero if the event was added, and zero if the event was ignored due to idle processing.
rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode : the struct rc_dev descriptor of the device : the scancode to look for
This routine is used by drivers which need to convert a scancode to a keycode. Normally it should not be used since drivers should have no interest in keycodes.
rc_keydown() - generates input event for a key press : the struct rc_dev descriptor of the device : the scancode that we're seeking : the toggle value (protocol dependent, if the protocol doesn't support toggle values, this should be set to zero)
This routine is used to signal that a key has been pressed on the remote control.
rc_keydown_notimeout() - generates input event for a key press without an automatic keyup event at a later time : the struct rc_dev descriptor of the device : the scancode that we're seeking : the toggle value (protocol dependent, if the protocol doesn't support toggle values, this should be set to zero)
This routine is used to signal that a key has been pressed on the remote control. The driver must manually call rc_keyup() at a later stage.