Ignore:
File:
1 edited

Legend:

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

    r357a302 rb7d8fd9  
    3838#define LIBDRV_USBHC_IFACE_H_
    3939
    40 #include "driver.h"
     40#include "ddf/driver.h"
    4141#include <usb/usb.h>
    4242#include <bool.h>
     
    167167        IPC_M_USBHC_CONTROL_READ,
    168168
    169         /* IPC_M_USB_ */
     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
    170192} usbhc_iface_funcs_t;
    171193
    172194/** Callback for outgoing transfer. */
    173 typedef void (*usbhc_iface_transfer_out_callback_t)(device_t *,
     195typedef void (*usbhc_iface_transfer_out_callback_t)(ddf_fun_t *,
    174196    int, void *);
    175197
    176198/** Callback for incoming transfer. */
    177 typedef void (*usbhc_iface_transfer_in_callback_t)(device_t *,
     199typedef void (*usbhc_iface_transfer_in_callback_t)(ddf_fun_t *,
    178200    int, size_t, void *);
    179201
    180202
    181203/** Out transfer processing function prototype. */
    182 typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t, size_t,
     204typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t, size_t,
    183205    void *, size_t,
    184206    usbhc_iface_transfer_out_callback_t, void *);
     
    188210
    189211/** In transfer processing function prototype. */
    190 typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t, size_t,
     212typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t, size_t,
    191213    void *, size_t,
    192214    usbhc_iface_transfer_in_callback_t, void *);
     
    194216/** USB host controller communication interface. */
    195217typedef struct {
    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);
     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);
    201228
    202229        usbhc_iface_transfer_out_t interrupt_out;
     
    206233        usbhc_iface_transfer_in_t bulk_in;
    207234
    208         int (*control_write)(device_t *, usb_target_t,
     235        int (*control_write)(ddf_fun_t *, usb_target_t,
    209236            size_t,
    210237            void *, size_t, void *, size_t,
    211238            usbhc_iface_transfer_out_callback_t, void *);
    212239
    213         int (*control_read)(device_t *, usb_target_t,
     240        int (*control_read)(ddf_fun_t *, usb_target_t,
    214241            size_t,
    215242            void *, size_t, void *, size_t,
Note: See TracChangeset for help on using the changeset viewer.