Ignore:
File:
1 edited

Legend:

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

    r065064e6 r70452dd4  
    4343        usb_standard_device_descriptor_t device;
    4444        /** Full configuration descriptor of current configuration. */
    45         const uint8_t *configuration;
     45        uint8_t *configuration;
    4646        size_t configuration_size;
    4747} usb_device_descriptors_t;
     
    5353typedef struct {
    5454        /** Interface descriptor. */
    55         const usb_standard_interface_descriptor_t *interface;
     55        usb_standard_interface_descriptor_t *interface;
    5656        /** Pointer to start of descriptor tree bound with this interface. */
    57         const uint8_t *nested_descriptors;
     57        uint8_t *nested_descriptors;
    5858        /** Size of data pointed by nested_descriptors in bytes. */
    5959        size_t nested_descriptors_size;
     
    9696        usb_device_descriptors_t descriptors;
    9797
    98         /** Generic DDF device backing this one. RO: DO NOT TOUCH!*/
     98        /** Generic DDF device backing this one. */
    9999        ddf_dev_t *ddf_dev;
    100100        /** Custom driver data.
     
    112112/** USB driver ops. */
    113113typedef struct {
    114         /** Callback when a new device was added to the system. */
    115         int (*device_add)(usb_device_t *);
    116         /** Callback when a device is about to be removed from the system. */
    117         int (*device_rem)(usb_device_t *);
    118         /** Callback when a device was removed from the system. */
    119         int (*device_gone)(usb_device_t *);
     114        /** Callback when new device is about to be controlled by the driver. */
     115        int (*add_device)(usb_device_t *);
    120116} usb_driver_ops_t;
    121117
     
    158154        usb_endpoint_description_t **endpoints;
    159155        /** Driver ops. */
    160         const usb_driver_ops_t *ops;
     156        usb_driver_ops_t *ops;
    161157} usb_driver_t;
    162158
     
    167163
    168164int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *);
    169 int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *,
    170     usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
     165int usb_device_create_pipes(ddf_dev_t *, usb_device_connection_t *,
     166    usb_endpoint_description_t **, uint8_t *, size_t, int, int,
    171167    usb_endpoint_mapping_t **, size_t *);
    172 int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
     168int usb_device_destroy_pipes(ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
    173169int usb_device_create(ddf_dev_t *, usb_endpoint_description_t **, usb_device_t **, const char **);
    174170void usb_device_destroy(usb_device_t *);
    175 void * usb_device_data_alloc(usb_device_t *, size_t);
    176171
    177 size_t usb_interface_count_alternates(const uint8_t *, size_t, uint8_t);
    178 int usb_alternate_interfaces_create(const uint8_t *, size_t, int,
     172size_t usb_interface_count_alternates(uint8_t *, size_t, uint8_t);
     173int usb_alternate_interfaces_create(uint8_t *, size_t, int,
    179174    usb_alternate_interfaces_t **);
    180175
Note: See TracChangeset for help on using the changeset viewer.