Changeset 357a302 in mainline for uspace/lib/drv/include/usb_iface.h


Ignore:
Timestamp:
2011-02-20T14:17:40Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b68b279
Parents:
3ae93a8
Message:

USB interfaces reorganization

The most important change is that getting USB address of a device
is an operation of generic USB interface, not USB-HC interface.
That is needed for proper functionality of a MID driver.

Also added sample implementation of USB interface operations as is
needed by most drivers (sample does not mean unfunctional or partially
implemented here).
They are stored in libusb/ddfiface.h

Updated UHCI, UHCI-RH, hub, VHC drivers to use these sample
implementations.

Updated libusb device recognition routines to route get_address requests
through USB interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usb_iface.h

    r3ae93a8 r357a302  
    4141#include <usb/usb.h>
    4242typedef enum {
     43        /** Tell USB address assigned to device.
     44         * Parameters:
     45         * - devman handle id
     46         * Answer:
     47         * - EINVAL - unknown handle or handle not managed by this driver
     48         * - ENOTSUP - operation not supported (shall not happen)
     49         * - arbitrary error code if returned by remote implementation
     50         * - EOK - handle found, first parameter contains the USB address
     51         */
     52        IPC_M_USB_GET_ADDRESS,
     53
    4354        /** Tell devman handle of device host controller.
    4455         * Parameters:
     
    5566/** USB device communication interface. */
    5667typedef struct {
     68        int (*get_address)(device_t *, devman_handle_t, usb_address_t *);
    5769        int (*get_hc_handle)(device_t *, devman_handle_t *);
    5870} usb_iface_t;
Note: See TracChangeset for help on using the changeset viewer.