Changeset 41df71f9 in mainline for uspace/lib/drv/include/usb_iface.h


Ignore:
Timestamp:
2017-11-02T14:29:15Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
887c9de
Parents:
479e32d
Message:

ddf: split usb interface to usb and usbhc

File:
1 edited

Legend:

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

    r479e32d r41df71f9  
    3232 */
    3333/** @file
    34  * @brief USB interface definition.
     34 * @brief USB device interface definition.
    3535 */
    3636
     
    5151extern int usb_get_my_device_handle(async_exch_t *, devman_handle_t *);
    5252
    53 extern int usb_reserve_default_address(async_exch_t *, usb_speed_t);
    54 extern int usb_release_default_address(async_exch_t *);
    55 
    56 extern int usb_device_enumerate(async_exch_t *, unsigned port);
    57 extern int usb_device_remove(async_exch_t *, unsigned port);
    58 
    59 extern int usb_register_endpoint(async_exch_t *, usb_endpoint_desc_t *);
    60 extern int usb_unregister_endpoint(async_exch_t *, usb_endpoint_desc_t *);
    61 extern int usb_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t,
    62     size_t *);
    63 extern int usb_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *,
    64     size_t);
    65 
    66 /** Defined in usb/host/usb_transfer_batch.h */
    67 typedef struct usb_transfer_batch usb_transfer_batch_t;
    68 
    69 /** Callback for outgoing transfer - clone of usb_transfer_batch_callback_t */
    70 typedef int (*usb_iface_transfer_callback_t)(usb_transfer_batch_t *);
    71 
    7253/** USB device communication interface. */
    7354typedef struct {
    7455        int (*get_my_interface)(ddf_fun_t *, int *);
    7556        int (*get_my_device_handle)(ddf_fun_t *, devman_handle_t *);
    76 
    77         int (*reserve_default_address)(ddf_fun_t *, usb_speed_t);
    78         int (*release_default_address)(ddf_fun_t *);
    79 
    80         int (*device_enumerate)(ddf_fun_t *, unsigned);
    81         int (*device_remove)(ddf_fun_t *, unsigned);
    82 
    83         int (*register_endpoint)(ddf_fun_t *, usb_endpoint_desc_t *);
    84         int (*unregister_endpoint)(ddf_fun_t *, usb_endpoint_desc_t *);
    85 
    86         int (*read)(ddf_fun_t *, usb_target_t,
    87                 uint64_t, char *, size_t,
    88                 usb_iface_transfer_callback_t, void *);
    89         int (*write)(ddf_fun_t *, usb_target_t,
    90                 uint64_t, const char *, size_t,
    91                 usb_iface_transfer_callback_t, void *);
    9257} usb_iface_t;
    9358
Note: See TracChangeset for help on using the changeset viewer.