Ignore:
Timestamp:
2013-01-25T22:55:22Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e79a2f
Parents:
c39e9fb
Message:

libusbdev: Don't use the descriptor field directly.

Make descriptor handling functions static.

File:
1 edited

Legend:

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

    rc39e9fb r945d66c  
    4242#include <usb_iface.h>
    4343
    44 /** Descriptors for USB device. */
    45 typedef struct {
    46         /** Standard device descriptor. */
    47         usb_standard_device_descriptor_t device;
    48         /** Full configuration descriptor of current configuration. */
    49         const uint8_t *configuration;
    50         size_t configuration_size;
    51 } usb_device_descriptors_t;
    5244
    5345/** Wrapper for data related to alternate interface setting.
     
    8476        /** The default control pipe. */
    8577        usb_pipe_t ctrl_pipe;
     78
    8679        /** Other endpoint pipes.
    8780         * This is an array of other endpoint pipes in the same order as
     
    10093        usb_alternate_interfaces_t alternate_interfaces;
    10194
    102         /** Some useful descriptors. */
    103         usb_device_descriptors_t descriptors;
     95        /** Some useful descriptors for USB device. */
     96        struct {
     97                /** Standard device descriptor. */
     98                usb_standard_device_descriptor_t device;
     99                /** Full configuration descriptor of current configuration. */
     100                const uint8_t *configuration;
     101                size_t configuration_size;
     102        } descriptors;
    104103
    105104        /** Generic DDF device backing this one. DO NOT TOUCH! */
     
    179178    const usb_endpoint_description_t **);
    180179
    181 int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *);
    182 void usb_device_release_descriptors(usb_device_descriptors_t *);
    183 
    184180int usb_device_create_pipes(usb_device_connection_t *,
    185181    const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
     
    188184usb_pipe_t *usb_device_get_default_pipe(usb_device_t *);
    189185usb_pipe_t *usb_device_get_pipe(usb_device_t *, usb_endpoint_t, usb_direction_t);
     186
     187const usb_standard_device_descriptor_t *
     188usb_device_get_device_descriptor(usb_device_t *);
     189const void * usb_device_get_configuration_descriptor(usb_device_t *, size_t *);
     190
    190191
    191192void * usb_device_data_alloc(usb_device_t *, size_t);
Note: See TracChangeset for help on using the changeset viewer.