Ignore:
Timestamp:
2011-04-12T14:07:02Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3d932af6
Parents:
910ca3f
Message:

Move more functionality to libUSB usb_transfer_batch_t

UHCI uses one device accessible buffer for both structures and data

File:
1 edited

Legend:

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

    r910ca3f r2cc6e97  
    5858        ddf_fun_t *fun;
    5959        void *private_data;
     60        void (*private_data_dtor)(void *p_data);
    6061};
    6162
    6263void usb_transfer_batch_init(
    6364    usb_transfer_batch_t *instance,
    64                 endpoint_t *ep,
     65    endpoint_t *ep,
    6566    char *buffer,
    6667    char *data_buffer,
     
    7273    void *arg,
    7374    ddf_fun_t *fun,
    74     void *private_data
     75    void *private_data,
     76    void (*private_data_dtor)(void *p_data)
    7577);
    7678
    77 static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l)
    78 {
    79         assert(l);
    80         return list_get_instance(l, usb_transfer_batch_t, link);
    81 }
    82 
    83 void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);
    84 void usb_transfer_batch_call_out(usb_transfer_batch_t *instance);
     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);
    8581void usb_transfer_batch_finish(usb_transfer_batch_t *instance);
     82void usb_transfer_batch_dispose(usb_transfer_batch_t *instance);
    8683
    8784static inline void usb_transfer_batch_finish_error(
     
    9390}
    9491
     92static 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
    9598#endif
    9699/**
Note: See TracChangeset for help on using the changeset viewer.