Ignore:
File:
1 edited

Legend:

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

    r2cc6e97 rcd1cec3b  
    4343typedef struct usb_transfer_batch usb_transfer_batch_t;
    4444struct usb_transfer_batch {
    45         endpoint_t *ep;
    4645        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;
    4750        usbhc_iface_transfer_in_callback_t callback_in;
    4851        usbhc_iface_transfer_out_callback_t callback_out;
    49         void *arg;
    5052        char *buffer;
    51         char *data_buffer;
     53        char *transport_buffer;
    5254        size_t buffer_size;
    5355        char *setup_buffer;
    5456        size_t setup_size;
     57        size_t max_packet_size;
    5558        size_t transfered_size;
    5659        void (*next_step)(usb_transfer_batch_t *);
    5760        int error;
    5861        ddf_fun_t *fun;
     62        void *arg;
     63        endpoint_t *ep;
    5964        void *private_data;
    60         void (*private_data_dtor)(void *p_data);
    6165};
    6266
    6367void usb_transfer_batch_init(
    6468    usb_transfer_batch_t *instance,
    65     endpoint_t *ep,
     69    usb_target_t target,
     70    usb_transfer_type_t transfer_type,
     71    usb_speed_t speed,
     72    size_t max_packet_size,
    6673    char *buffer,
    67     char *data_buffer,
     74    char *transport_buffer,
    6875    size_t buffer_size,
    6976    char *setup_buffer,
     
    7380    void *arg,
    7481    ddf_fun_t *fun,
    75     void *private_data,
    76     void (*private_data_dtor)(void *p_data)
     82                endpoint_t *ep,
     83    void *private_data
    7784);
    7885
    79 void usb_transfer_batch_call_in_and_dispose(usb_transfer_batch_t *instance);
    80 void usb_transfer_batch_call_out_and_dispose(usb_transfer_batch_t *instance);
     86static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l)
     87{
     88        assert(l);
     89        return list_get_instance(l, usb_transfer_batch_t, link);
     90}
     91
     92void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);
     93void usb_transfer_batch_call_out(usb_transfer_batch_t *instance);
    8194void usb_transfer_batch_finish(usb_transfer_batch_t *instance);
    82 void usb_transfer_batch_dispose(usb_transfer_batch_t *instance);
    8395
    8496static inline void usb_transfer_batch_finish_error(
     
    90102}
    91103
    92 static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l)
    93 {
    94         assert(l);
    95         return list_get_instance(l, usb_transfer_batch_t, link);
    96 }
    97 
    98104#endif
    99105/**
Note: See TracChangeset for help on using the changeset viewer.