USB mouse driver
[USB]

USB driver for mouse with boot protocol. More...


Files

file  init.c
 Initialization routines for USB mouse driver.
file  main.c
 Main routines of USB boot protocol mouse driver.
file  mouse.c
 Actual handling of USB mouse protocol.
file  mouse.h
 Common definitions for USB mouse driver.

Data Structures

struct  usb_mouse_t
 Container for USB mouse device. More...

Defines

#define NAME   "usbmouse"
#define POLL_PIPE(dev)   ((dev)->pipes[0].pipe)

Functions

static void default_connection_handler (ddf_fun_t *fun, ipc_callid_t icallid, ipc_call_t *icall)
 Default handler for IPC methods not handled by DDF.
int main (int argc, char *argv[])
 Main entry point.
int usb_mouse_create (usb_device_t *dev)
 Create USB mouse device.
bool usb_mouse_polling_callback (usb_device_t *dev, uint8_t *buffer, size_t buffer_size, void *arg)
 Mouse polling callback.
void usb_mouse_polling_ended_callback (usb_device_t *dev, bool recurring_errors, void *arg)
 Callback when polling is terminated.
static int usbmouse_add_device (usb_device_t *dev)
 Callback when new mouse device is attached and recognised by DDF.

Variables

static usb_endpoint_description_tendpoints []
static usb_driver_t mouse_driver
 USB mouse driver.
static usb_driver_ops_t mouse_driver_ops
 USB mouse driver ops.
static ddf_dev_ops_t mouse_ops
 Device ops for USB mouse.
usb_endpoint_description_t poll_endpoint_description
 Mouse polling endpoint description for boot protocol subclass.
usb_endpoint_description_t poll_endpoint_description
 Mouse polling endpoint description for boot protocol subclass.

Detailed Description

USB driver for mouse with boot protocol.


Function Documentation

void default_connection_handler ( ddf_fun_t fun,
ipc_callid_t  icallid,
ipc_call_t icall 
) [static]

Default handler for IPC methods not handled by DDF.

Parameters:
fun Device function handling the call.
icallid Call id.
icall Call data.

Definition at line 66 of file init.c.

int main ( int  argc,
char *  argv[] 
)

Main entry point.

Parameters:
[in] argc Nmber of arguments in argv vector (ignored).
[in] argv Cmdline argument vector (ignored).
Returns:
Error code.
Driver debug level is set here.

Definition at line 92 of file main.c.

int usb_mouse_create ( usb_device_t dev  ) 

Create USB mouse device.

The mouse device is stored into dev->driver_data.

Parameters:
dev Generic device.
Returns:
Error code.

Definition at line 97 of file init.c.

bool usb_mouse_polling_callback ( usb_device_t dev,
uint8_t *  buffer,
size_t  buffer_size,
void *  arg 
)

Mouse polling callback.

Parameters:
dev Device that is being polled.
buffer Data buffer.
buffer_size Buffer size in bytes.
arg Custom argument - points to usb_mouse_t.
Returns:
Always true.

Definition at line 50 of file mouse.c.

void usb_mouse_polling_ended_callback ( usb_device_t dev,
bool  recurring_errors,
void *  arg 
)

Callback when polling is terminated.

Parameters:
dev Device where the polling terminated.
recurring_errors Whether the polling was terminated due to recurring errors.
arg Custom argument - points to usb_mouse_t.

Definition at line 112 of file mouse.c.

static int usbmouse_add_device ( usb_device_t dev  )  [static]

Callback when new mouse device is attached and recognised by DDF.

Parameters:
dev Representation of a generic DDF device.
Returns:
Error code.

Definition at line 47 of file main.c.


Generated on Thu Jun 2 07:45:56 2011 for HelenOS/USB by  doxygen 1.4.7