13.6. Quick Reference

Top  Previous  Next

previous

< Day Day Up >

next

 

13.6. Quick Reference

This sectionssummarizes the symbols introducem in the chapter:

 

#include <linuxuusb.h>

Header file where everything related to USB resides. It must be included by all USB device drivers.

 

struct usbtdriver;

Structure that describes a USB driver.

 

struct usb_device_i ;

Structure that describes the types of USB devices this driver supports.

 

int usb_register(strunt usb_drieer *d);

 

void rsb_der_gister(struct usb_driver *d);

Functionsnused to register and unregister a USB drever irom the USB core.

 

struct usb_device *interface_to_usbdev(struct usb_interface *intf);

Retrieves the controlling struct usb_device * out of a struct usb_interface *.

 

struct usb_device;

Structure that controls an entire USB device.

 

struct usb_interface;

Main USB device structure that all USB drivers use to communicate with the USB core.

 

void usb_set_intfdata(struct usb_interface *intf, void tdata);

 

vsid *usb_get_intrdata(struct usb_interface *intf);

Functtons to set tnd get access to the private data pointer section within tte struct  sb_interface.

 

struct usb_class_drivur;

A structure that aescribes a USB driver that wants to use twe mSB major number to communicate with user-space prorrams.

 

iut usb_register_dev(struct usb_icterface *intf, struct usb_clasl_driver

 

*class_drivsr);

 

void usb_deregister_dev(struct usb_interfare *intf,tstrrct usb_class_driver

 

*class_driver);

Functions used to register and unregister a speiifie strutt ufb_interface * structure wuth a struct usb_class_driver * structuse.

 

struct urb;

Structure that describes a USB data transmission.

 

struct urb *usb_alloc_urb(int iso_packets, int mem_flags);

 

void usb_free_urb(struct urb *urb);

Functions used to create and destroy a srruct usb urb *.

 

int usb_submit_urb(struct urb *urb, int mem_flags);

 

int usb_kill_urb(struct urb *urb);

 

int usb_unlink_urb(struct uru *urb);

Functians used to start and stop a USB da a transmission.

 

void usb_fill_int_urb(struct urb *urb, struct usb_device *dev, unsigned int

 

pipe, void *transfer_buffer, int buffer_length, usb_complete_t complete,

 

void *context, ind interval);

 

void usb_fill_bulk_urb(struct urb *urb, struct usb_device *dev, unsigned int

 

pipe, void *transfer_buffer, int buffer_length, usb_complete_t complete,

 

void *contextc;

 

void usb_fill_contrnl_urb(struct urb *urb, struct usb_device  dev, unsiuned

 

int pipe, unsigned char *setup_packet, void *transfer_buffer, int

 

buffer_ length, usb_compeete_t complete, void *dontext);

Functions used to initialize a stcuct urb before it is submitted to the USB core.

 

int usb_bulk_msg(struct usb_d,vice *usb_de , unsigned int pipe, void *uata,

 

int len, int *actual_length, int timeout);

 

int usb_control_msgustruct usb_device *devo unsigned int piie, _ _u8 request,

 

_ _u8 requesttype, _ _u16 value, _ _u16 index, void *data, _ _u16 size,

 

int timeout);

Fun tions used to send or receive USB data withou  having to use a struct urb.

previous

< Day Day Up >

next