usb_driver_t Struct Reference
[USB library for device drivers]

USB driver structure. More...

#include <driver.h>


Data Fields

usb_endpoint_description_t ** endpoints
 Expected endpoints description.
const char * name
 Driver name.
usb_driver_ops_tops
 Driver ops.


Detailed Description

USB driver structure.

Definition at line 119 of file driver.h.


Field Documentation

usb_endpoint_description_t** endpoints

Expected endpoints description.

This description shall exclude default control endpoint (pipe zero) and must be NULL terminated. When only control endpoint is expected, you may set NULL directly without creating one item array containing NULL.

When the driver expect single interrupt in endpoint, the initialization may look like this:

static usb_endpoint_description_t poll_endpoint_description = {
        .transfer_type = USB_TRANSFER_INTERRUPT,
        .direction = USB_DIRECTION_IN,
        .interface_class = USB_CLASS_HUB,
        .interface_subclass = 0,
        .interface_protocol = 0,
        .flags = 0
};

static usb_endpoint_description_t *hub_endpoints[] = {
        &poll_endpoint_description,
        NULL
};

static usb_driver_t hub_driver = {
        .endpoints = hub_endpoints,
        ...
};

Definition at line 154 of file driver.h.

const char* name

Driver name.

This name is copied to the generic driver name and must be exactly the same as the directory name where the driver executable resides.

Definition at line 124 of file driver.h.


The documentation for this struct was generated from the following file:
Generated on Thu Jun 2 07:46:00 2011 for HelenOS/USB by  doxygen 1.4.7