Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
hid-wiimote-core.c File Reference
#include <linux/completion.h>
#include <linux/device.h>
#include <linux/hid.h>
#include <linux/input.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/power_supply.h>
#include <linux/spinlock.h>
#include "hid-ids.h"
#include "hid-wiimote.h"

Go to the source code of this file.

Data Structures

struct  wiiproto_handler
 

Macros

#define wiiproto_req_wreg(wdata, os, buf, sz)   wiiproto_req_wmem((wdata), false, (os), (buf), (sz))
 
#define wiiproto_req_weeprom(wdata, os, buf, sz)   wiiproto_req_wmem((wdata), true, (os), (buf), (sz))
 
#define ir_to_input0(wdata, ir, packed)
 
#define ir_to_input1(wdata, ir, packed)
 
#define ir_to_input2(wdata, ir, packed)
 
#define ir_to_input3(wdata, ir, packed)
 

Enumerations

enum  wiiproto_keys {
  WIIPROTO_KEY_LEFT, WIIPROTO_KEY_RIGHT, WIIPROTO_KEY_UP, WIIPROTO_KEY_DOWN,
  WIIPROTO_KEY_PLUS, WIIPROTO_KEY_MINUS, WIIPROTO_KEY_ONE, WIIPROTO_KEY_TWO,
  WIIPROTO_KEY_A, WIIPROTO_KEY_B, WIIPROTO_KEY_HOME, WIIPROTO_KEY_COUNT
}
 

Functions

void wiiproto_req_drm (struct wiimote_data *wdata, __u8 drm)
 
void wiiproto_req_rmem (struct wiimote_data *wdata, bool eeprom, __u32 offset, __u16 size)
 
int wiimote_cmd_write (struct wiimote_data *wdata, __u32 offset, const __u8 *wmem, __u8 size)
 
ssize_t wiimote_cmd_read (struct wiimote_data *wdata, __u32 offset, __u8 *rmem, __u8 size)
 
 MODULE_DEVICE_TABLE (hid, wiimote_hid_devices)
 
 module_init (wiimote_init)
 
 module_exit (wiimote_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("David Herrmann <[email protected]>")
 
 MODULE_DESCRIPTION (WIIMOTE_NAME" Device Driver")
 

Macro Definition Documentation

#define ir_to_input0 (   wdata,
  ir,
  packed 
)
Value:
__ir_to_input((wdata), (ir), (packed), \

Definition at line 753 of file hid-wiimote-core.c.

#define ir_to_input1 (   wdata,
  ir,
  packed 
)
Value:
__ir_to_input((wdata), (ir), (packed), \

Definition at line 755 of file hid-wiimote-core.c.

#define ir_to_input2 (   wdata,
  ir,
  packed 
)
Value:
__ir_to_input((wdata), (ir), (packed), \

Definition at line 757 of file hid-wiimote-core.c.

#define ir_to_input3 (   wdata,
  ir,
  packed 
)
Value:
__ir_to_input((wdata), (ir), (packed), \

Definition at line 759 of file hid-wiimote-core.c.

#define wiiproto_req_weeprom (   wdata,
  os,
  buf,
  sz 
)    wiiproto_req_wmem((wdata), true, (os), (buf), (sz))

Definition at line 295 of file hid-wiimote-core.c.

#define wiiproto_req_wreg (   wdata,
  os,
  buf,
  sz 
)    wiiproto_req_wmem((wdata), false, (os), (buf), (sz))

Definition at line 292 of file hid-wiimote-core.c.

Enumeration Type Documentation

Enumerator:
WIIPROTO_KEY_LEFT 
WIIPROTO_KEY_RIGHT 
WIIPROTO_KEY_UP 
WIIPROTO_KEY_DOWN 
WIIPROTO_KEY_PLUS 
WIIPROTO_KEY_MINUS 
WIIPROTO_KEY_ONE 
WIIPROTO_KEY_TWO 
WIIPROTO_KEY_A 
WIIPROTO_KEY_B 
WIIPROTO_KEY_HOME 
WIIPROTO_KEY_COUNT 

Definition at line 25 of file hid-wiimote-core.c.

Function Documentation

MODULE_AUTHOR ( "David Herrmann <[email protected]>"  )
MODULE_DESCRIPTION ( WIIMOTE_NAME" Device Driver"  )
MODULE_DEVICE_TABLE ( hid  ,
wiimote_hid_devices   
)
module_exit ( wiimote_exit  )
module_init ( wiimote_init  )
MODULE_LICENSE ( "GPL"  )
ssize_t wiimote_cmd_read ( struct wiimote_data wdata,
__u32  offset,
__u8 rmem,
__u8  size 
)

Definition at line 368 of file hid-wiimote-core.c.

int wiimote_cmd_write ( struct wiimote_data wdata,
__u32  offset,
const __u8 wmem,
__u8  size 
)

Definition at line 349 of file hid-wiimote-core.c.

void wiiproto_req_drm ( struct wiimote_data wdata,
__u8  drm 
)

Definition at line 229 of file hid-wiimote-core.c.

void wiiproto_req_rmem ( struct wiimote_data wdata,
bool  eeprom,
__u32  offset,
__u16  size 
)

Definition at line 323 of file hid-wiimote-core.c.