Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
legousbtower.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/completion.h>
#include <linux/mutex.h>
#include <asm/uaccess.h>
#include <linux/usb.h>
#include <linux/poll.h>

Go to the source code of this file.

Data Structures

struct  tower_reset_reply
 
struct  tower_get_version_reply
 
struct  lego_usb_tower
 

Macros

#define dbg(lvl, format, arg...)
 
#define DRIVER_VERSION   "v0.96"
 
#define DRIVER_AUTHOR   "Juergen Stuber <[email protected]>"
 
#define DRIVER_DESC   "LEGO USB Tower Driver"
 
#define LEGO_USB_TOWER_VENDOR_ID   0x0694
 
#define LEGO_USB_TOWER_PRODUCT_ID   0x0001
 
#define LEGO_USB_TOWER_REQUEST_RESET   0x04
 
#define LEGO_USB_TOWER_REQUEST_GET_VERSION   0xFD
 
#define LEGO_USB_TOWER_MINOR_BASE   160
 

Functions

 module_param (debug, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (debug,"Debug enabled or not")
 
 module_param (read_buffer_size, int, 0)
 
 MODULE_PARM_DESC (read_buffer_size,"Read buffer size")
 
 module_param (write_buffer_size, int, 0)
 
 MODULE_PARM_DESC (write_buffer_size,"Write buffer size")
 
 module_param (packet_timeout, int, 0)
 
 MODULE_PARM_DESC (packet_timeout,"Packet timeout in ms")
 
 module_param (read_timeout, int, 0)
 
 MODULE_PARM_DESC (read_timeout,"Read timeout in ms")
 
 module_param (interrupt_in_interval, int, 0)
 
 MODULE_PARM_DESC (interrupt_in_interval,"Interrupt in interval in ms")
 
 module_param (interrupt_out_interval, int, 0)
 
 MODULE_PARM_DESC (interrupt_out_interval,"Interrupt out interval in ms")
 
struct tower_reset_reply __attribute__ ((packed))
 
 MODULE_DEVICE_TABLE (usb, tower_table)
 
 module_usb_driver (tower_driver)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 

Variables

__le16 size
 
__u8 err_code
 
__u8 spare
 
__u8 major
 
__u8 minor
 
__le16 build_no
 
struct lego_usb_tower __attribute__
 

Macro Definition Documentation

#define dbg (   lvl,
  format,
  arg... 
)
Value:
do { \
if (debug >= lvl) \
printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
} while (0)

Definition at line 98 of file legousbtower.c.

#define DRIVER_AUTHOR   "Juergen Stuber <[email protected]>"

Definition at line 106 of file legousbtower.c.

#define DRIVER_DESC   "LEGO USB Tower Driver"

Definition at line 107 of file legousbtower.c.

#define DRIVER_VERSION   "v0.96"

Definition at line 105 of file legousbtower.c.

#define LEGO_USB_TOWER_MINOR_BASE   160

Definition at line 206 of file legousbtower.c.

#define LEGO_USB_TOWER_PRODUCT_ID   0x0001

Definition at line 175 of file legousbtower.c.

#define LEGO_USB_TOWER_REQUEST_GET_VERSION   0xFD

Definition at line 179 of file legousbtower.c.

#define LEGO_USB_TOWER_REQUEST_RESET   0x04

Definition at line 178 of file legousbtower.c.

#define LEGO_USB_TOWER_VENDOR_ID   0x0694

Definition at line 174 of file legousbtower.c.

Function Documentation

struct tower_reset_reply __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
tower_table   
)
module_param ( debug  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( read_buffer_size  ,
int  ,
 
)
module_param ( write_buffer_size  ,
int  ,
 
)
module_param ( packet_timeout  ,
int  ,
 
)
module_param ( read_timeout  ,
int  ,
 
)
module_param ( interrupt_in_interval  ,
int  ,
 
)
module_param ( interrupt_out_interval  ,
int  ,
 
)
MODULE_PARM_DESC ( debug  ,
"Debug enabled or not"   
)
MODULE_PARM_DESC ( read_buffer_size  ,
"Read buffer size  
)
MODULE_PARM_DESC ( write_buffer_size  ,
"Write buffer size  
)
MODULE_PARM_DESC ( packet_timeout  ,
"Packet timeout in ms  
)
MODULE_PARM_DESC ( read_timeout  ,
"Read timeout in ms  
)
MODULE_PARM_DESC ( interrupt_in_interval  ,
"Interrupt in interval in ms  
)
MODULE_PARM_DESC ( interrupt_out_interval  ,
"Interrupt out interval in ms  
)
module_usb_driver ( tower_driver  )

Variable Documentation

__le16 build_no

Definition at line 200 of file legousbtower.c.

__u8 err_code

Definition at line 187 of file legousbtower.c.

__u8 major

Definition at line 198 of file legousbtower.c.

__u8 minor

Definition at line 199 of file legousbtower.c.

__le16 size

Definition at line 186 of file legousbtower.c.

__u8 spare

Definition at line 188 of file legousbtower.c.