Changeset 50ba203 in mainline for uspace/lib/drv/include/usbhc_iface.h


Ignore:
Timestamp:
2011-02-20T15:46:48Z (14 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6bb83c7
Parents:
d81ef61c (diff), 0c00dac (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge with usb/development

File:
1 edited

Legend:

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

    rd81ef61c r50ba203  
    4040#include "driver.h"
    4141#include <usb/usb.h>
     42#include <bool.h>
    4243
    4344
     
    6667 *   - argument #2 is target endpoint
    6768 *   - argument #3 is buffer size
     69 * - this call is immediately followed by IPC data read (async version)
    6870 * - the call is not answered until the device returns some data (or until
    6971 *   error occurs)
    70  * - if the call is answered with EOK, first argument of the answer is buffer
    71  *   hash that could be used to retrieve the actual data
    7272 *
    7373 * Some special methods (NO-DATA transactions) do not send any data. These
    7474 * might behave as both OUT or IN transactions because communication parts
    7575 * where actual buffers are exchanged are omitted.
    76  *
    77  * The mentioned data retrieval can be done any time after receiving EOK
    78  * answer to IN method.
    79  * This retrieval is done using the IPC_M_USBHC_GET_BUFFER where
    80  * the first argument is buffer hash from call answer.
    81  * This call must be immediately followed by data read-in and after the
    82  * data are transferred, the initial call (IPC_M_USBHC_GET_BUFFER)
    83  * is answered. Each buffer can be retrieved only once.
    84  *
     76 **
    8577 * For all these methods, wrap functions exists. Important rule: functions
    8678 * for IN transactions have (as parameters) buffers where retrieved data
     
    10496        IPC_M_USBHC_GET_ADDRESS,
    10597
    106         /** Asks for data buffer.
    107          * See explanation at usb_iface_funcs_t.
    108          * This function does not have counter part in functional interface
    109          * as it is handled by the remote part itself.
    110          */
    111         IPC_M_USBHC_GET_BUFFER,
    112 
    11398
    11499        /** Reserve usage of default address.
     
    223208/** Callback for outgoing transfer. */
    224209typedef void (*usbhc_iface_transfer_out_callback_t)(device_t *,
    225     usb_transaction_outcome_t, void *);
     210    int, void *);
    226211
    227212/** Callback for incoming transfer. */
    228213typedef void (*usbhc_iface_transfer_in_callback_t)(device_t *,
    229     usb_transaction_outcome_t, size_t, void *);
     214    int, size_t, void *);
    230215
    231216
    232217/** Out transfer processing function prototype. */
    233 typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t,
     218typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t, size_t,
    234219    void *, size_t,
    235220    usbhc_iface_transfer_out_callback_t, void *);
    236221
    237 /** Setup transfer processing function prototype. */
     222/** Setup transfer processing function prototype. @deprecated */
    238223typedef usbhc_iface_transfer_out_t usbhc_iface_transfer_setup_t;
    239224
    240225/** In transfer processing function prototype. */
    241 typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t,
     226typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t, size_t,
    242227    void *, size_t,
    243228    usbhc_iface_transfer_in_callback_t, void *);
     
    247232        int (*tell_address)(device_t *, devman_handle_t, usb_address_t *);
    248233
    249         int (*reserve_default_address)(device_t *);
     234        int (*reserve_default_address)(device_t *, bool);
    250235        int (*release_default_address)(device_t *);
    251         int (*request_address)(device_t *, usb_address_t *);
     236        int (*request_address)(device_t *, bool, usb_address_t *);
    252237        int (*bind_address)(device_t *, usb_address_t, devman_handle_t);
    253238        int (*release_address)(device_t *, usb_address_t);
     
    267252
    268253        int (*control_write)(device_t *, usb_target_t,
     254            size_t,
    269255            void *, size_t, void *, size_t,
    270256            usbhc_iface_transfer_out_callback_t, void *);
    271257
    272258        int (*control_read)(device_t *, usb_target_t,
     259            size_t,
    273260            void *, size_t, void *, size_t,
    274261            usbhc_iface_transfer_in_callback_t, void *);
Note: See TracChangeset for help on using the changeset viewer.