Ignore:
File:
1 edited

Legend:

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

    r7fc260ff r882580a  
    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;
    7874        /** The default control pipe. */
    7975        usb_pipe_t ctrl_pipe;
     
    9187        int interface_no;
    9288
    93         /** Alternative interfaces. */
    94         usb_alternate_interfaces_t alternate_interfaces;
     89        /** Alternative interfaces.
     90         * Set to NULL when the driver controls whole device
     91         * (i.e. more (or any) interfaces).
     92         */
     93        usb_alternate_interfaces_t *alternate_interfaces;
    9594
    9695        /** Some useful descriptors. */
    9796        usb_device_descriptors_t descriptors;
    9897
    99         /** Generic DDF device backing this one. DO NOT TOUCH! */
     98        /** Generic DDF device backing this one. RO: DO NOT TOUCH!*/
    10099        ddf_dev_t *ddf_dev;
    101100        /** Custom driver data.
     
    104103         */
    105104        void *driver_data;
     105
     106        /** Connection backing the pipes.
     107         * Typically, you will not need to use this attribute at all.
     108         */
     109        usb_device_connection_t wire;
    106110} usb_device_t;
    107111
     
    159163int usb_driver_main(const usb_driver_t *);
    160164
     165int usb_device_select_interface(usb_device_t *, uint8_t,
     166    const usb_endpoint_description_t **);
     167
     168int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *);
     169int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *,
     170    const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
     171    usb_endpoint_mapping_t **, size_t *);
     172int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
    161173int usb_device_init(usb_device_t *, ddf_dev_t *,
    162174    const usb_endpoint_description_t **, const char **);
    163175void usb_device_deinit(usb_device_t *);
    164176
    165 int usb_device_select_interface(usb_device_t *, uint8_t,
    166     const usb_endpoint_description_t **);
    167 
    168 int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *);
    169 void usb_device_release_descriptors(usb_device_descriptors_t *);
    170 
    171 int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *,
    172     const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
    173     usb_endpoint_mapping_t **, size_t *);
    174 int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
    175 
    176177void * usb_device_data_alloc(usb_device_t *, size_t);
    177178
    178179size_t usb_interface_count_alternates(const uint8_t *, size_t, uint8_t);
    179 int usb_alternate_interfaces_init(usb_alternate_interfaces_t *,
    180     const uint8_t *, size_t, int);
    181 void usb_alternate_interfaces_deinit(usb_alternate_interfaces_t *);
     180int usb_alternate_interfaces_create(const uint8_t *, size_t, int,
     181    usb_alternate_interfaces_t **);
     182void usb_alternate_interfaces_destroy(usb_alternate_interfaces_t *);
    182183#endif
    183184/**
Note: See TracChangeset for help on using the changeset viewer.