Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rc-main.c File Reference
#include <media/rc-core.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/module.h>
#include "rc-core-priv.h"

Go to the source code of this file.

Macros

#define IR_TAB_MIN_SIZE   256
 
#define IR_TAB_MAX_SIZE   8192
 
#define IR_KEYPRESS_TIMEOUT   250
 

Functions

struct rc_maprc_map_get (const char *name)
 
 EXPORT_SYMBOL_GPL (rc_map_get)
 
int rc_map_register (struct rc_map_list *map)
 
 EXPORT_SYMBOL_GPL (rc_map_register)
 
void rc_map_unregister (struct rc_map_list *map)
 
 EXPORT_SYMBOL_GPL (rc_map_unregister)
 

: name to assign to the table

ir_create_table() - initializes a scancode table : the rc_map to initialize

: ir type to assign to the new table : initial size of the table

Returns
: zero on success or a negative error code

This routine will initialize the rc_map and will allocate memory to hold at least the specified number of elements.

#define PROTO_NONE   "none"
 
#define ADD_HOTPLUG_VAR(fmt, val...)
 
int rc_core_debug
 
u32 rc_g_keycode_from_table (struct rc_dev *dev, u32 scancode)
 
 EXPORT_SYMBOL_GPL (rc_g_keycode_from_table)
 
void rc_keyup (struct rc_dev *dev)
 
 EXPORT_SYMBOL_GPL (rc_keyup)
 
void rc_repeat (struct rc_dev *dev)
 
 EXPORT_SYMBOL_GPL (rc_repeat)
 
void rc_keydown (struct rc_dev *dev, int scancode, u8 toggle)
 
 EXPORT_SYMBOL_GPL (rc_keydown)
 
void rc_keydown_notimeout (struct rc_dev *dev, int scancode, u8 toggle)
 
 EXPORT_SYMBOL_GPL (rc_keydown_notimeout)
 
struct rc_devrc_allocate_device (void)
 
 EXPORT_SYMBOL_GPL (rc_allocate_device)
 
void rc_free_device (struct rc_dev *dev)
 
 EXPORT_SYMBOL_GPL (rc_free_device)
 
int rc_register_device (struct rc_dev *dev)
 
 EXPORT_SYMBOL_GPL (rc_register_device)
 
void rc_unregister_device (struct rc_dev *dev)
 
 EXPORT_SYMBOL_GPL (rc_unregister_device)
 
 module_init (rc_core_init)
 
 module_exit (rc_core_exit)
 
 EXPORT_SYMBOL_GPL (rc_core_debug)
 
 module_param_named (debug, rc_core_debug, int, 0644)
 
 MODULE_AUTHOR ("Mauro Carvalho Chehab <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ADD_HOTPLUG_VAR (   fmt,
  val... 
)
Value:
do { \
if (err) \
return err; \
} while (0)

Definition at line 936 of file rc-main.c.

#define IR_KEYPRESS_TIMEOUT   250

Definition at line 29 of file rc-main.c.

#define IR_TAB_MAX_SIZE   8192

Definition at line 26 of file rc-main.c.

#define IR_TAB_MIN_SIZE   256

Definition at line 25 of file rc-main.c.

#define PROTO_NONE   "none"

Definition at line 745 of file rc-main.c.

Function Documentation

EXPORT_SYMBOL_GPL ( rc_map_get  )
EXPORT_SYMBOL_GPL ( rc_map_register  )
EXPORT_SYMBOL_GPL ( rc_map_unregister  )
EXPORT_SYMBOL_GPL ( rc_g_keycode_from_table  )
EXPORT_SYMBOL_GPL ( rc_keyup  )
EXPORT_SYMBOL_GPL ( rc_repeat  )
EXPORT_SYMBOL_GPL ( rc_keydown  )
EXPORT_SYMBOL_GPL ( rc_keydown_notimeout  )
EXPORT_SYMBOL_GPL ( rc_allocate_device  )
EXPORT_SYMBOL_GPL ( rc_free_device  )
EXPORT_SYMBOL_GPL ( rc_register_device  )
EXPORT_SYMBOL_GPL ( rc_unregister_device  )
EXPORT_SYMBOL_GPL ( rc_core_debug  )
MODULE_AUTHOR ( "Mauro Carvalho Chehab <[email protected]>"  )
module_exit ( rc_core_exit  )
module_init ( rc_core_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( debug  ,
rc_core_debug  ,
int  ,
0644   
)
struct rc_dev* rc_allocate_device ( void  )
read

Definition at line 984 of file rc-main.c.

void rc_free_device ( struct rc_dev dev)

Definition at line 1016 of file rc-main.c.

u32 rc_g_keycode_from_table ( struct rc_dev dev,
u32  scancode 
)

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

Returns
: the corresponding keycode, or KEY_RESERVED

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.

Definition at line 500 of file rc-main.c.

void rc_keydown ( struct rc_dev dev,
int  scancode,
u8  toggle 
)

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.

Definition at line 664 of file rc-main.c.

void rc_keydown_notimeout ( struct rc_dev dev,
int  scancode,
u8  toggle 
)

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.

Definition at line 691 of file rc-main.c.

void rc_keyup ( struct rc_dev dev)

rc_keyup() - signals the release of a keypress : the struct rc_dev descriptor of the device

This routine is used to signal that a key has been released on the remote control.

Definition at line 550 of file rc-main.c.

struct rc_map* rc_map_get ( const char name)
read

Definition at line 51 of file rc-main.c.

int rc_map_register ( struct rc_map_list map)

Definition at line 80 of file rc-main.c.

void rc_map_unregister ( struct rc_map_list map)

Definition at line 89 of file rc-main.c.

int rc_register_device ( struct rc_dev dev)

Definition at line 1031 of file rc-main.c.

void rc_repeat ( struct rc_dev dev)

rc_repeat() - signals that a key is still pressed : the struct rc_dev descriptor of the device

This routine is used by IR decoders when a repeat message which does not include the necessary bits to reproduce the scancode has been received.

Definition at line 596 of file rc-main.c.

void rc_unregister_device ( struct rc_dev dev)

Definition at line 1151 of file rc-main.c.

Variable Documentation

char* name

Definition at line 730 of file rc-main.c.

int rc_core_debug

Definition at line 1201 of file rc-main.c.

Definition at line 729 of file rc-main.c.