Ignore:
File:
1 edited

Legend:

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

    rbbce2c2 rbf793bf  
    123123        IPC_M_USBHC_RELEASE_ADDRESS,
    124124
     125
     126        /** Send interrupt data to device.
     127         * See explanation at usb_iface_funcs_t (OUT transaction).
     128         */
     129        IPC_M_USBHC_INTERRUPT_OUT,
     130
     131        /** Get interrupt data from device.
     132         * See explanation at usb_iface_funcs_t (IN transaction).
     133         */
     134        IPC_M_USBHC_INTERRUPT_IN,
     135
     136        /** Send bulk data to device.
     137         * See explanation at usb_iface_funcs_t (OUT transaction).
     138         */
     139        IPC_M_USBHC_BULK_OUT,
     140
     141        /** Get bulk data from device.
     142         * See explanation at usb_iface_funcs_t (IN transaction).
     143         */
     144        IPC_M_USBHC_BULK_IN,
     145
     146        /** Issue control WRITE transfer.
     147         * See explanation at usb_iface_funcs_t (OUT transaction) for
     148         * call parameters.
     149         * This call is immediately followed by two IPC data writes
     150         * from the caller (setup packet and actual data).
     151         */
     152        IPC_M_USBHC_CONTROL_WRITE,
     153
     154        /** Issue control READ transfer.
     155         * See explanation at usb_iface_funcs_t (IN transaction) for
     156         * call parameters.
     157         * This call is immediately followed by IPC data write from the caller
     158         * (setup packet) and IPC data read (buffer that was read).
     159         */
     160        IPC_M_USBHC_CONTROL_READ,
     161
    125162        /** Register endpoint attributes at host controller.
    126163         * This is used to reserve portion of USB bandwidth.
     
    148185         * - ENOENT - unknown endpoint
    149186         */
    150         IPC_M_USBHC_UNREGISTER_ENDPOINT,
    151 
    152         /** Get data from device.
    153          * See explanation at usb_iface_funcs_t (IN transaction).
    154          */
    155         IPC_M_USBHC_READ,
    156 
    157         /** Send data to device.
    158          * See explanation at usb_iface_funcs_t (OUT transaction).
    159          */
    160         IPC_M_USBHC_WRITE,
     187        IPC_M_USBHC_UNREGISTER_ENDPOINT
    161188} usbhc_iface_funcs_t;
    162189
    163190/** Callback for outgoing transfer. */
    164 typedef void (*usbhc_iface_transfer_out_callback_t)(ddf_fun_t *, int, void *);
     191typedef void (*usbhc_iface_transfer_out_callback_t)(ddf_fun_t *,
     192    int, void *);
    165193
    166194/** Callback for incoming transfer. */
    167195typedef void (*usbhc_iface_transfer_in_callback_t)(ddf_fun_t *,
    168196    int, size_t, void *);
     197
     198
     199/** Out transfer processing function prototype. */
     200typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t,
     201    void *, size_t,
     202    usbhc_iface_transfer_out_callback_t, void *);
     203
     204/** Setup transfer processing function prototype. @deprecated */
     205typedef usbhc_iface_transfer_out_t usbhc_iface_transfer_setup_t;
     206
     207/** In transfer processing function prototype. */
     208typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t,
     209    void *, size_t,
     210    usbhc_iface_transfer_in_callback_t, void *);
    169211
    170212/** USB host controller communication interface. */
     
    181223            usb_direction_t);
    182224
    183         int (*read)(ddf_fun_t *, usb_target_t, uint64_t, uint8_t *, size_t,
     225        usbhc_iface_transfer_out_t interrupt_out;
     226        usbhc_iface_transfer_in_t interrupt_in;
     227
     228        usbhc_iface_transfer_out_t bulk_out;
     229        usbhc_iface_transfer_in_t bulk_in;
     230
     231        int (*control_write)(ddf_fun_t *, usb_target_t,
     232            void *, size_t, void *, size_t,
     233            usbhc_iface_transfer_out_callback_t, void *);
     234
     235        int (*control_read)(ddf_fun_t *, usb_target_t,
     236            void *, size_t, void *, size_t,
    184237            usbhc_iface_transfer_in_callback_t, void *);
    185 
    186         int (*write)(ddf_fun_t *, usb_target_t, uint64_t, const uint8_t *,
    187             size_t, usbhc_iface_transfer_out_callback_t, void *);
    188238} usbhc_iface_t;
    189239
Note: See TracChangeset for help on using the changeset viewer.