Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
testusb.c File Reference
#include <stdio.h>
#include <string.h>
#include <ftw.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/usbdevice_fs.h>

Go to the source code of this file.

Data Structures

struct  usbtest_param
 
struct  usb_device_descriptor
 
struct  usb_interface_descriptor
 
struct  testdev
 

Macros

#define TEST_CASES   30
 
#define USBTEST_REQUEST   _IOWR('U', 100, struct usbtest_param)
 
#define USB_DT_DEVICE   0x01
 
#define USB_DT_INTERFACE   0x04
 
#define USB_CLASS_PER_INTERFACE   0 /* for DeviceClass */
 
#define USB_CLASS_VENDOR_SPEC   0xff
 

Enumerations

enum  usb_device_speed {
  USB_SPEED_UNKNOWN = 0, USB_SPEED_LOW, USB_SPEED_FULL, USB_SPEED_HIGH,
  USB_SPEED_VARIABLE, USB_SPEED_UNKNOWN = 0, USB_SPEED_LOW, USB_SPEED_FULL,
  USB_SPEED_HIGH, USB_SPEED_WIRELESS, USB_SPEED_SUPER, USB_SPEED_UNKNOWN = 0,
  USB_SPEED_LOW, USB_SPEED_FULL, USB_SPEED_HIGH
}
 

Functions

struct usb_device_descriptor __attribute__ ((packed))
 
int main (int argc, char **argv)
 

Variables

struct usbtest_param __attribute__
 
__u8 bLength
 
__u8 bDescriptorType
 
__u16 bcdUSB
 
__u8 bDeviceClass
 
__u8 bDeviceSubClass
 
__u8 bDeviceProtocol
 
__u8 bMaxPacketSize0
 
__u16 idVendor
 
__u16 idProduct
 
__u16 bcdDevice
 
__u8 iManufacturer
 
__u8 iProduct
 
__u8 iSerialNumber
 
__u8 bNumConfigurations
 
__u8 bInterfaceNumber
 
__u8 bAlternateSetting
 
__u8 bNumEndpoints
 
__u8 bInterfaceClass
 
__u8 bInterfaceSubClass
 
__u8 bInterfaceProtocol
 
__u8 iInterface
 

Macro Definition Documentation

#define TEST_CASES   30

Definition at line 51 of file testusb.c.

#define USB_CLASS_PER_INTERFACE   0 /* for DeviceClass */

Definition at line 75 of file testusb.c.

#define USB_CLASS_VENDOR_SPEC   0xff

Definition at line 76 of file testusb.c.

#define USB_DT_DEVICE   0x01

Definition at line 72 of file testusb.c.

#define USB_DT_INTERFACE   0x04

Definition at line 73 of file testusb.c.

#define USBTEST_REQUEST   _IOWR('U', 100, struct usbtest_param)

Definition at line 66 of file testusb.c.

Enumeration Type Documentation

Enumerator:
USB_SPEED_UNKNOWN 
USB_SPEED_LOW 
USB_SPEED_FULL 
USB_SPEED_HIGH 
USB_SPEED_VARIABLE 
USB_SPEED_UNKNOWN 
USB_SPEED_LOW 
USB_SPEED_FULL 
USB_SPEED_HIGH 
USB_SPEED_WIRELESS 
USB_SPEED_SUPER 
USB_SPEED_UNKNOWN 
USB_SPEED_LOW 
USB_SPEED_FULL 
USB_SPEED_HIGH 

Definition at line 109 of file testusb.c.

Function Documentation

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.

int main ( int  argc,
char **  argv 
)

Definition at line 377 of file testusb.c.

Variable Documentation

__u8 bAlternateSetting

Definition at line 112 of file testusb.c.

__u16 bcdDevice

Definition at line 104 of file testusb.c.

__u16 bcdUSB

Definition at line 97 of file testusb.c.

__u8 bDescriptorType

Definition at line 96 of file testusb.c.

__u8 bDeviceClass

Definition at line 98 of file testusb.c.

__u8 bDeviceProtocol

Definition at line 100 of file testusb.c.

__u8 bDeviceSubClass

Definition at line 99 of file testusb.c.

__u8 bInterfaceClass

Definition at line 114 of file testusb.c.

__u8 bInterfaceNumber

Definition at line 111 of file testusb.c.

__u8 bInterfaceProtocol

Definition at line 116 of file testusb.c.

__u8 bInterfaceSubClass

Definition at line 115 of file testusb.c.

__u8 bLength

Definition at line 95 of file testusb.c.

__u8 bMaxPacketSize0

Definition at line 101 of file testusb.c.

__u8 bNumConfigurations

Definition at line 108 of file testusb.c.

__u8 bNumEndpoints

Definition at line 113 of file testusb.c.

__u16 idProduct

Definition at line 103 of file testusb.c.

__u16 idVendor

Definition at line 102 of file testusb.c.

__u8 iInterface

Definition at line 117 of file testusb.c.

__u8 iManufacturer

Definition at line 105 of file testusb.c.

__u8 iProduct

Definition at line 106 of file testusb.c.

__u8 iSerialNumber

Definition at line 107 of file testusb.c.