usb.h File Reference

Common USB types and functions. More...

#include <sys/types.h>
#include <byteorder.h>

Go to the source code of this file.

Data Structures

struct  usb_target_t
 USB complete address type. More...

Defines

#define uint16_host2usb(n)   host2uint16_t_le((n))
 Convert 16bit value from native (host) endianness to USB endianness.
#define uint16_usb2host(n)   uint16_t_le2host((n))
 Convert 16bit value from USB endianness into native (host) one.
#define uint32_host2usb(n)   host2uint32_t_le((n))
 Convert 32bit value from native (host) endianness to USB endianness.
#define uint32_usb2host(n)   uint32_t_le2host((n))
 Convert 32bit value from USB endianness into native (host) one.
#define USB11_ADDRESS_MAX   128
 Maximum address number in USB 1.1.
#define USB11_ENDPOINT_MAX   16
 Maximum endpoint number in USB 1.1.
#define USB_ADDRESS_DEFAULT   0
 Default USB address.
#define USB_HC_DDF_CLASS_NAME   "usbhc"
 Class name for USB host controllers.

Typedefs

typedef int usb_address_t
 USB address type.
typedef int usb_endpoint_t
 USB endpoint number type.
typedef sysarg_t usb_handle_t
 General handle type.

Enumerations

enum  usb_direction_t
 USB data transfer direction.
enum  usb_packet_id
 USB packet identifier.
enum  usb_request_recipient_t
 USB request recipient.
enum  usb_request_type_t
 USB request type target.
enum  usb_speed_t { USB_SPEED_LOW, USB_SPEED_FULL, USB_SPEED_HIGH, USB_SPEED_MAX }
 USB speeds. More...
enum  usb_transfer_type_t
 USB transfer type.

Functions

const char * usb_str_speed (usb_speed_t s)
 String representation of USB speed.
const char * usb_str_transfer_type (usb_transfer_type_t t)
 String representation for USB transfer type.
const char * usb_str_transfer_type_short (usb_transfer_type_t t)
 String representation for USB transfer type (short version).
static int usb_target_same (usb_target_t a, usb_target_t b)
 Compare USB targets (addresses and endpoints).


Detailed Description

Common USB types and functions.

Definition in file usb.h.


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