Ignore:
Timestamp:
2011-11-05T14:33:07Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab27e01
Parents:
904dcc6
Message:

libusbdev: Merge init_wire_and_ctrl_pipe to the only place it was called.

Add usb_device_release_descriptors function that properly clears the descriptor
structure.

File:
1 edited

Legend:

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

    r904dcc6 r7fc260ff  
    7272/** USB device structure. */
    7373typedef struct {
     74        /** Connection backing the pipes.
     75         * Typically, you will not need to use this attribute at all.
     76         */
     77        usb_device_connection_t wire;
    7478        /** The default control pipe. */
    7579        usb_pipe_t ctrl_pipe;
     
    9397        usb_device_descriptors_t descriptors;
    9498
    95         /** Generic DDF device backing this one. RO: DO NOT TOUCH!*/
     99        /** Generic DDF device backing this one. DO NOT TOUCH! */
    96100        ddf_dev_t *ddf_dev;
    97101        /** Custom driver data.
     
    100104         */
    101105        void *driver_data;
    102 
    103         /** Connection backing the pipes.
    104          * Typically, you will not need to use this attribute at all.
    105          */
    106         usb_device_connection_t wire;
    107106} usb_device_t;
    108107
     
    160159int usb_driver_main(const usb_driver_t *);
    161160
     161int usb_device_init(usb_device_t *, ddf_dev_t *,
     162    const usb_endpoint_description_t **, const char **);
     163void usb_device_deinit(usb_device_t *);
     164
    162165int usb_device_select_interface(usb_device_t *, uint8_t,
    163166    const usb_endpoint_description_t **);
    164167
    165168int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *);
     169void usb_device_release_descriptors(usb_device_descriptors_t *);
     170
    166171int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *,
    167172    const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
    168173    usb_endpoint_mapping_t **, size_t *);
    169174int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
    170 int usb_device_init(usb_device_t *, ddf_dev_t *,
    171     const usb_endpoint_description_t **, const char **);
    172 void usb_device_deinit(usb_device_t *);
    173175
    174176void * usb_device_data_alloc(usb_device_t *, size_t);
Note: See TracChangeset for help on using the changeset viewer.