Ignore:
Timestamp:
2013-01-26T18:32:32Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2dc5a9f
Parents:
8e10ef4
Message:

libusbdev: Move alternate interface handling to its own header file.

Fix initialization loop.

File:
1 edited

Legend:

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

    r8e10ef4 rb208b3b  
    3838
    3939#include <usb/hc.h>
     40#include <usb/dev/alternate_ifaces.h>
    4041#include <usb/dev/usb_device_connection.h>
    4142#include <usb/dev/pipes.h>
    4243#include <usb_iface.h>
    43 
    44 
    45 /** Wrapper for data related to alternate interface setting.
    46  * The pointers will typically point inside configuration descriptor and
    47  * thus you shall not deallocate them.
    48  */
    49 typedef struct {
    50         /** Interface descriptor. */
    51         const usb_standard_interface_descriptor_t *interface;
    52         /** Pointer to start of descriptor tree bound with this interface. */
    53         const uint8_t *nested_descriptors;
    54         /** Size of data pointed by nested_descriptors in bytes. */
    55         size_t nested_descriptors_size;
    56 } usb_alternate_interface_descriptors_t;
    57 
    58 /** Alternate interface settings. */
    59 typedef struct {
    60         /** Array of alternate interfaces descriptions. */
    61         const usb_alternate_interface_descriptors_t *alternatives;
    62         /** Size of @c alternatives array. */
    63         size_t alternative_count;
    64         /** Index of currently selected one. */
    65         size_t current;
    66 } usb_alternate_interfaces_t;
    67 
    68 size_t usb_interface_count_alternates(const uint8_t *, size_t, uint8_t);
    69 int usb_alternate_interfaces_init(usb_alternate_interfaces_t *,
    70     const uint8_t *, size_t, int);
    71 void usb_alternate_interfaces_deinit(usb_alternate_interfaces_t *);
    7244
    7345/** USB device structure. */
     
    192164
    193165int usb_device_get_iface_number(usb_device_t *);
     166
    194167const usb_standard_device_descriptor_t *
    195168usb_device_get_device_descriptor(usb_device_t *);
Note: See TracChangeset for help on using the changeset viewer.