Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
printer.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/list.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/moduleparam.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/types.h>
#include <linux/ctype.h>
#include <linux/cdev.h>
#include <asm/byteorder.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/uaccess.h>
#include <asm/unaligned.h>
#include <linux/usb/ch9.h>
#include <linux/usb/composite.h>
#include <linux/usb/gadget.h>
#include <linux/usb/g_printer.h>
#include "gadget_chips.h"

Go to the source code of this file.

Data Structures

struct  printer_dev
 

Macros

#define DRIVER_DESC   "Printer Gadget"
 
#define DRIVER_VERSION   "2007 OCT 06"
 
#define PRINTER_VENDOR_NUM   0x0525 /* NetChip */
 
#define PRINTER_PRODUCT_NUM   0xa4a8 /* Linux-USB Printer Gadget */
 
#define QLEN   qlen
 
#define USB_DESC_BUFSIZE   256
 
#define USB_BUFSIZE   8192
 
#define ep_desc(g, hs, fs)   (((g)->speed == USB_SPEED_HIGH)?(hs):(fs))
 

Functions

 USB_GADGET_COMPOSITE_OPTIONS ()
 
 module_param_named (iSerialNum, coverwrite.serial_number, charp, S_IRUGO)
 
 MODULE_PARM_DESC (iSerialNum,"1")
 
 module_param (iPNPstring, charp, S_IRUGO)
 
 MODULE_PARM_DESC (iPNPstring,"MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;")
 
 module_param (qlen, uint, S_IRUGO|S_IWUSR)
 
 module_init (init)
 
 module_exit (cleanup)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_AUTHOR ("Craig Nadler")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DRIVER_DESC   "Printer Gadget"

Definition at line 48 of file printer.c.

#define DRIVER_VERSION   "2007 OCT 06"

Definition at line 49 of file printer.c.

#define ep_desc (   g,
  hs,
  fs 
)    (((g)->speed == USB_SPEED_HIGH)?(hs):(fs))

Definition at line 223 of file printer.c.

#define PRINTER_PRODUCT_NUM   0xa4a8 /* Linux-USB Printer Gadget */

Definition at line 103 of file printer.c.

#define PRINTER_VENDOR_NUM   0x0525 /* NetChip */

Definition at line 102 of file printer.c.

#define QLEN   qlen

Definition at line 121 of file printer.c.

#define USB_BUFSIZE   8192

Definition at line 132 of file printer.c.

#define USB_DESC_BUFSIZE   256

Definition at line 131 of file printer.c.

Function Documentation

MODULE_AUTHOR ( "Craig Nadler"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
module_exit ( cleanup  )
module_init ( init  )
MODULE_LICENSE ( "GPL"  )
module_param ( iPNPstring  ,
charp  ,
S_IRUGO   
)
module_param ( qlen  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param_named ( iSerialNum  ,
coverwrite.  serial_number,
charp  ,
S_IRUGO   
)
MODULE_PARM_DESC ( iSerialNum  ,
"1"   
)
MODULE_PARM_DESC ( iPNPstring  ,
"MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;"   
)
USB_GADGET_COMPOSITE_OPTIONS ( )