Ignore:
Timestamp:
2011-04-17T19:17:55Z (13 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63517c2, cfbbe1d3
Parents:
ef354b6 (diff), 8595577b (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:

new report structure fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/host/batch.h

    ref354b6 re50cd7f  
    4343typedef struct usb_transfer_batch usb_transfer_batch_t;
    4444struct usb_transfer_batch {
     45        endpoint_t *ep;
    4546        link_t link;
    46         usb_target_t target;
    47         usb_transfer_type_t transfer_type;
    48         usb_speed_t speed;
    49         usb_direction_t direction;
    5047        usbhc_iface_transfer_in_callback_t callback_in;
    5148        usbhc_iface_transfer_out_callback_t callback_out;
     49        void *arg;
    5250        char *buffer;
    53         char *transport_buffer;
     51        char *data_buffer;
    5452        size_t buffer_size;
    5553        char *setup_buffer;
    5654        size_t setup_size;
    57         size_t max_packet_size;
    5855        size_t transfered_size;
    5956        void (*next_step)(usb_transfer_batch_t *);
    6057        int error;
    6158        ddf_fun_t *fun;
    62         void *arg;
    63         endpoint_t *ep;
    6459        void *private_data;
     60        void (*private_data_dtor)(void *p_data);
    6561};
    6662
    6763void usb_transfer_batch_init(
    6864    usb_transfer_batch_t *instance,
    69     usb_target_t target,
    70     usb_transfer_type_t transfer_type,
    71     usb_speed_t speed,
    72     size_t max_packet_size,
     65    endpoint_t *ep,
    7366    char *buffer,
    74     char *transport_buffer,
     67    char *data_buffer,
    7568    size_t buffer_size,
    7669    char *setup_buffer,
     
    8073    void *arg,
    8174    ddf_fun_t *fun,
    82                 endpoint_t *ep,
    83     void *private_data
     75    void *private_data,
     76    void (*private_data_dtor)(void *p_data)
    8477);
     78
     79void usb_transfer_batch_call_in_and_dispose(usb_transfer_batch_t *instance);
     80void usb_transfer_batch_call_out_and_dispose(usb_transfer_batch_t *instance);
     81void usb_transfer_batch_finish(usb_transfer_batch_t *instance);
     82void usb_transfer_batch_dispose(usb_transfer_batch_t *instance);
     83
     84static inline void usb_transfer_batch_finish_error(
     85    usb_transfer_batch_t *instance, int error)
     86{
     87        assert(instance);
     88        instance->error = error;
     89        usb_transfer_batch_finish(instance);
     90}
    8591
    8692static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l)
     
    9096}
    9197
    92 void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);
    93 void usb_transfer_batch_call_out(usb_transfer_batch_t *instance);
    94 void usb_transfer_batch_finish(usb_transfer_batch_t *instance, int error);
    95 
    9698#endif
    9799/**
Note: See TracChangeset for help on using the changeset viewer.