Changeset a837544 in mainline for uspace/lib/usbhost/src/iface.c


Ignore:
Timestamp:
2011-09-13T12:30:05Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4cbb6e4
Parents:
3822f7c9
Message:

libusbhost: Use uint64_t to pass setup_data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/iface.c

    r3822f7c9 ra837544  
    4141static inline int send_batch(
    4242    ddf_fun_t *fun, usb_target_t target, usb_direction_t direction,
    43     void *data, size_t size, void * setup_data,
     43    void *data, size_t size, uint64_t setup_data,
    4444    usbhc_iface_transfer_in_callback_t in,
    4545    usbhc_iface_transfer_out_callback_t out, void *arg, const char* name)
     
    236236{
    237237        return send_batch(fun, target, USB_DIRECTION_OUT, data, size,
    238             NULL, NULL, callback, arg, "Interrupt OUT");
     238            0, NULL, callback, arg, "Interrupt OUT");
    239239}
    240240/*----------------------------------------------------------------------------*/
     
    254254{
    255255        return send_batch(fun, target, USB_DIRECTION_IN, data, size,
    256             NULL, callback, NULL, arg, "Interrupt IN");
     256            0, callback, NULL, arg, "Interrupt IN");
    257257}
    258258/*----------------------------------------------------------------------------*/
     
    272272{
    273273        return send_batch(fun, target, USB_DIRECTION_OUT, data, size,
    274             NULL, NULL, callback, arg, "Bulk OUT");
     274            0, NULL, callback, arg, "Bulk OUT");
    275275}
    276276/*----------------------------------------------------------------------------*/
     
    290290{
    291291        return send_batch(fun, target, USB_DIRECTION_IN, data, size,
    292             NULL, callback, NULL, arg, "Bulk IN");
     292            0, callback, NULL, arg, "Bulk IN");
    293293}
    294294/*----------------------------------------------------------------------------*/
     
    310310    usbhc_iface_transfer_out_callback_t callback, void *arg)
    311311{
     312        uint64_t setup_buffer;
     313        memcpy(&setup_buffer, setup_data, 8);
    312314        return send_batch(fun, target, USB_DIRECTION_BOTH, data, size,
    313             setup_data, NULL, callback, arg, "Control WRITE");
     315            setup_buffer, NULL, callback, arg, "Control WRITE");
    314316}
    315317/*----------------------------------------------------------------------------*/
     
    331333    usbhc_iface_transfer_in_callback_t callback, void *arg)
    332334{
     335        uint64_t setup_buffer;
     336        memcpy(&setup_buffer, setup_data, 8);
    333337        return send_batch(fun, target, USB_DIRECTION_BOTH, data, size,
    334             setup_data, callback, NULL, arg, "Control READ");
     338            setup_buffer, callback, NULL, arg, "Control READ");
    335339}
    336340/*----------------------------------------------------------------------------*/
     
    340344{
    341345        return send_batch(fun, target, USB_DIRECTION_IN, data, size,
    342             &setup_data, callback, NULL, arg, "READ");
     346            setup_data, callback, NULL, arg, "READ");
    343347}
    344348/*----------------------------------------------------------------------------*/
     
    348352{
    349353        return send_batch(fun, target, USB_DIRECTION_OUT, (uint8_t*)data, size,
    350             &setup_data, NULL, callback, arg, "WRITE");
     354            setup_data, NULL, callback, arg, "WRITE");
    351355}
    352356/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.