Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usb_iface.h

    r8f1dd3b r9d58539  
    4242#include <usb/usb.h>
    4343
    44 typedef async_sess_t usb_dev_session_t;
    45 
    46 usb_dev_session_t *usb_dev_connect(devman_handle_t);
    47 usb_dev_session_t *usb_dev_connect_to_self(ddf_dev_t *);
    48 void usb_dev_disconnect(usb_dev_session_t *);
    49 
     44int usb_get_my_address(async_exch_t *, usb_address_t *);
    5045int usb_get_my_interface(async_exch_t *, int *);
    51 int usb_get_my_device_handle(async_exch_t *, devman_handle_t *);
    52 
    53 int usb_reserve_default_address(async_exch_t *, usb_speed_t);
    54 int usb_release_default_address(async_exch_t *);
    55 
    56 int usb_device_enumerate(async_exch_t *, unsigned port);
    57 int usb_device_remove(async_exch_t *, unsigned port);
    58 
    59 int usb_register_endpoint(async_exch_t *, usb_endpoint_t, usb_transfer_type_t,
    60     usb_direction_t, size_t, unsigned);
    61 int usb_unregister_endpoint(async_exch_t *, usb_endpoint_t, usb_direction_t);
    62 int usb_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t, size_t *);
    63 int usb_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *, size_t);
    64 
    65 /** Callback for outgoing transfer. */
    66 typedef void (*usb_iface_transfer_out_callback_t)(int, void *);
    67 
    68 /** Callback for incoming transfer. */
    69 typedef void (*usb_iface_transfer_in_callback_t)(int, size_t, void *);
     46int usb_get_hc_handle(async_exch_t *, devman_handle_t *);
    7047
    7148/** USB device communication interface. */
    7249typedef struct {
     50        int (*get_my_address)(ddf_fun_t *, usb_address_t *);
    7351        int (*get_my_interface)(ddf_fun_t *, int *);
    74         int (*get_my_device_handle)(ddf_fun_t *, devman_handle_t *);
    75 
    76         int (*reserve_default_address)(ddf_fun_t *, usb_speed_t);
    77         int (*release_default_address)(ddf_fun_t *);
    78 
    79         int (*device_enumerate)(ddf_fun_t *, unsigned);
    80         int (*device_remove)(ddf_fun_t *, unsigned);
    81 
    82         int (*register_endpoint)(ddf_fun_t *, usb_endpoint_t,
    83             usb_transfer_type_t, usb_direction_t, size_t, unsigned);
    84         int (*unregister_endpoint)(ddf_fun_t *, usb_endpoint_t,
    85             usb_direction_t);
    86 
    87         int (*read)(ddf_fun_t *, usb_endpoint_t, uint64_t, uint8_t *, size_t,
    88             usb_iface_transfer_in_callback_t, void *);
    89         int (*write)(ddf_fun_t *, usb_endpoint_t, uint64_t, const uint8_t *,
    90             size_t, usb_iface_transfer_out_callback_t, void *);
     52        int (*get_hc_handle)(ddf_fun_t *, devman_handle_t *);
    9153} usb_iface_t;
    9254
Note: See TracChangeset for help on using the changeset viewer.