Ignore:
File:
1 edited

Legend:

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

    rb36e5de2 r6427cf67  
    5353 *   - argument #1 is target address
    5454 *   - argument #2 is target endpoint
    55  *   - argument #3 is max packet size of the endpoint
     55 *   - argument #3 is buffer size
    5656 * - this call is immediately followed by IPC data write (from caller)
    5757 * - the initial call (and the whole transaction) is answer after the
     
    6666 *   - argument #1 is target address
    6767 *   - argument #2 is target endpoint
    68  *   - argument #3 is max packet size of the endpoint
     68 *   - argument #3 is buffer size
    6969 * - this call is immediately followed by IPC data read (async version)
    7070 * - the call is not answered until the device returns some data (or until
     
    153153        IPC_M_USBHC_INTERRUPT_IN,
    154154
     155
     156        /** Start WRITE control transfer.
     157         * See explanation at usb_iface_funcs_t (OUT transaction).
     158         */
     159        IPC_M_USBHC_CONTROL_WRITE_SETUP,
     160
     161        /** Send control-transfer data to device.
     162         * See explanation at usb_iface_funcs_t (OUT transaction).
     163         */
     164        IPC_M_USBHC_CONTROL_WRITE_DATA,
     165
     166        /** Terminate WRITE control transfer.
     167         * See explanation at usb_iface_funcs_t (NO-DATA transaction).
     168         */
     169        IPC_M_USBHC_CONTROL_WRITE_STATUS,
     170
     171
     172
     173        /** Start READ control transfer.
     174         * See explanation at usb_iface_funcs_t (OUT transaction).
     175         */
     176        IPC_M_USBHC_CONTROL_READ_SETUP,
     177
     178        /** Get control-transfer data from device.
     179         * See explanation at usb_iface_funcs_t (IN transaction).
     180         */
     181        IPC_M_USBHC_CONTROL_READ_DATA,
     182
     183        /** Terminate READ control transfer.
     184         * See explanation at usb_iface_funcs_t (NO-DATA transaction).
     185         */
     186        IPC_M_USBHC_CONTROL_READ_STATUS,
     187
    155188        /** Issue control WRITE transfer.
    156189         * See explanation at usb_iface_funcs_t (OUT transaction) for
     
    161194        IPC_M_USBHC_CONTROL_WRITE,
    162195
    163         /** Issue control READ transfer.
     196        /** Issue control WRITE transfer.
    164197         * See explanation at usb_iface_funcs_t (IN transaction) for
    165198         * call parameters.
    166          * This call is immediately followed by IPC data write from the caller
    167          * (setup packet) and IPC data read (buffer that was read).
     199         * This call is immediately followed by IPC data read from the caller
     200         * (setup packet).
     201         * Actual data are retrieved through IPC_M_USBHC_GET_BUFFER.
    168202         */
    169203        IPC_M_USBHC_CONTROL_READ,
     
    182216
    183217/** Out transfer processing function prototype. */
    184 typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t, size_t,
     218typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t,
    185219    void *, size_t,
    186220    usbhc_iface_transfer_out_callback_t, void *);
    187221
    188 /** Setup transfer processing function prototype. @deprecated */
     222/** Setup transfer processing function prototype. */
    189223typedef usbhc_iface_transfer_out_t usbhc_iface_transfer_setup_t;
    190224
    191225/** In transfer processing function prototype. */
    192 typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t, size_t,
     226typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t,
    193227    void *, size_t,
    194228    usbhc_iface_transfer_in_callback_t, void *);
     
    198232        int (*tell_address)(device_t *, devman_handle_t, usb_address_t *);
    199233
    200         int (*reserve_default_address)(device_t *, usb_speed_t);
     234        int (*reserve_default_address)(device_t *, bool);
    201235        int (*release_default_address)(device_t *);
    202         int (*request_address)(device_t *, usb_speed_t, usb_address_t *);
     236        int (*request_address)(device_t *, bool, usb_address_t *);
    203237        int (*bind_address)(device_t *, usb_address_t, devman_handle_t);
    204238        int (*release_address)(device_t *, usb_address_t);
     
    207241        usbhc_iface_transfer_in_t interrupt_in;
    208242
     243        usbhc_iface_transfer_setup_t control_write_setup;
     244        usbhc_iface_transfer_out_t control_write_data;
     245        int (*control_write_status)(device_t *, usb_target_t,
     246            usbhc_iface_transfer_in_callback_t, void *);
     247
     248        usbhc_iface_transfer_setup_t control_read_setup;
     249        usbhc_iface_transfer_in_t control_read_data;
     250        int (*control_read_status)(device_t *, usb_target_t,
     251            usbhc_iface_transfer_out_callback_t, void *);
     252
    209253        int (*control_write)(device_t *, usb_target_t,
    210             size_t,
    211254            void *, size_t, void *, size_t,
    212255            usbhc_iface_transfer_out_callback_t, void *);
    213256
    214257        int (*control_read)(device_t *, usb_target_t,
    215             size_t,
    216258            void *, size_t, void *, size_t,
    217259            usbhc_iface_transfer_in_callback_t, void *);
Note: See TracChangeset for help on using the changeset viewer.