Ignore:
Timestamp:
2013-01-27T00:44:23Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
71384bd3
Parents:
8b68bdf
Message:

libusbdev: Make usb_device_t opaque.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/driver.h

    r8b68bdf rfd9b3a67  
    4343#include <usb_iface.h>
    4444
    45 /** USB device structure. */
    46 typedef struct {
    47         /** Connection to USB hc, used by wire and arbitrary requests. */
    48         usb_hc_connection_t hc_conn;
    49         /** Connection backing the pipes.
    50          * Typically, you will not need to use this attribute at all.
    51          */
    52         usb_device_connection_t wire;
    53         /** The default control pipe. */
    54         usb_pipe_t ctrl_pipe;
    55 
    56         /** Other endpoint pipes.
    57          * This is an array of other endpoint pipes in the same order as
    58          * in usb_driver_t.
    59          */
    60         usb_endpoint_mapping_t *pipes;
    61         /** Number of other endpoint pipes. */
    62         size_t pipes_count;
    63         /** Current interface.
    64          * Usually, drivers operate on single interface only.
    65          * This item contains the value of the interface or -1 for any.
    66          */
    67         int interface_no;
    68         /** Alternative interfaces. */
    69         usb_alternate_interfaces_t alternate_interfaces;
    70 
    71         /** Some useful descriptors for USB device. */
    72         struct {
    73                 /** Standard device descriptor. */
    74                 usb_standard_device_descriptor_t device;
    75                 /** Full configuration descriptor of current configuration. */
    76                 const uint8_t *configuration;
    77                 size_t configuration_size;
    78         } descriptors;
    79 
    80         /** Generic DDF device backing this one. DO NOT TOUCH! */
    81         ddf_dev_t *ddf_dev;
    82         /** Custom driver data.
    83          * Do not use the entry in generic device, that is already used
    84          * by the framework.
    85          */
    86         void *driver_data;
    87 
    88         usb_dev_session_t *bus_session;
    89 } usb_device_t;
     45typedef struct usb_device usb_device_t;
    9046
    9147/** USB driver ops. */
     
    14298int usb_driver_main(const usb_driver_t *);
    14399
    144 int usb_device_init(usb_device_t *, ddf_dev_t *,
    145     const usb_endpoint_description_t **, const char **);
    146 void usb_device_deinit(usb_device_t *);
     100int usb_device_create_ddf(ddf_dev_t *, const usb_endpoint_description_t **, const char **);
     101void usb_device_destroy_ddf(ddf_dev_t *);
    147102
    148103const char* usb_device_get_name(usb_device_t *);
Note: See TracChangeset for help on using the changeset viewer.