Ignore:
File:
1 edited

Legend:

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

    rb7d8fd9 r357a302  
    3838#define LIBDRV_USBHC_IFACE_H_
    3939
    40 #include "ddf/driver.h"
     40#include "driver.h"
    4141#include <usb/usb.h>
    4242#include <bool.h>
     
    167167        IPC_M_USBHC_CONTROL_READ,
    168168
    169         /** Register endpoint attributes at host controller.
    170          * This is used to reserve portion of USB bandwidth.
    171          * Parameters:
    172          * - USB address + endpoint number (ADDR * 256 + EP)
    173          * - transfer type + direction (TYPE * 256 + DIR)
    174          * - maximum packet size
    175          * - interval (in milliseconds)
    176          * Answer:
    177          * - EOK - reservation successful
    178          * - ELIMIT - not enough bandwidth to satisfy the request
    179          */
    180         IPC_M_USBHC_REGISTER_ENDPOINT,
    181 
    182         /** Revert endpoint registration.
    183          * Parameters:
    184          * - USB address
    185          * - endpoint number
    186          * - data direction
    187          * Answer:
    188          * - EOK - endpoint unregistered
    189          * - ENOENT - unknown endpoint
    190          */
    191         IPC_M_USBHC_UNREGISTER_ENDPOINT
     169        /* IPC_M_USB_ */
    192170} usbhc_iface_funcs_t;
    193171
    194172/** Callback for outgoing transfer. */
    195 typedef void (*usbhc_iface_transfer_out_callback_t)(ddf_fun_t *,
     173typedef void (*usbhc_iface_transfer_out_callback_t)(device_t *,
    196174    int, void *);
    197175
    198176/** Callback for incoming transfer. */
    199 typedef void (*usbhc_iface_transfer_in_callback_t)(ddf_fun_t *,
     177typedef void (*usbhc_iface_transfer_in_callback_t)(device_t *,
    200178    int, size_t, void *);
    201179
    202180
    203181/** Out transfer processing function prototype. */
    204 typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t, size_t,
     182typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t, size_t,
    205183    void *, size_t,
    206184    usbhc_iface_transfer_out_callback_t, void *);
     
    210188
    211189/** In transfer processing function prototype. */
    212 typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t, size_t,
     190typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t, size_t,
    213191    void *, size_t,
    214192    usbhc_iface_transfer_in_callback_t, void *);
     
    216194/** USB host controller communication interface. */
    217195typedef struct {
    218         int (*reserve_default_address)(ddf_fun_t *, usb_speed_t);
    219         int (*release_default_address)(ddf_fun_t *);
    220         int (*request_address)(ddf_fun_t *, usb_speed_t, usb_address_t *);
    221         int (*bind_address)(ddf_fun_t *, usb_address_t, devman_handle_t);
    222         int (*release_address)(ddf_fun_t *, usb_address_t);
    223 
    224         int (*register_endpoint)(ddf_fun_t *, usb_address_t, usb_endpoint_t,
    225             usb_transfer_type_t, usb_direction_t, size_t, unsigned int);
    226         int (*unregister_endpoint)(ddf_fun_t *, usb_address_t, usb_endpoint_t,
    227             usb_direction_t);
     196        int (*reserve_default_address)(device_t *, usb_speed_t);
     197        int (*release_default_address)(device_t *);
     198        int (*request_address)(device_t *, usb_speed_t, usb_address_t *);
     199        int (*bind_address)(device_t *, usb_address_t, devman_handle_t);
     200        int (*release_address)(device_t *, usb_address_t);
    228201
    229202        usbhc_iface_transfer_out_t interrupt_out;
     
    233206        usbhc_iface_transfer_in_t bulk_in;
    234207
    235         int (*control_write)(ddf_fun_t *, usb_target_t,
     208        int (*control_write)(device_t *, usb_target_t,
    236209            size_t,
    237210            void *, size_t, void *, size_t,
    238211            usbhc_iface_transfer_out_callback_t, void *);
    239212
    240         int (*control_read)(ddf_fun_t *, usb_target_t,
     213        int (*control_read)(device_t *, usb_target_t,
    241214            size_t,
    242215            void *, size_t, void *, size_t,
Note: See TracChangeset for help on using the changeset viewer.