Changeset f1d6866 in mainline for uspace/drv/bus/usb/ohci/ohci_batch.h


Ignore:
Timestamp:
2011-09-18T21:22:59Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dcc44ca1
Parents:
85ff862 (diff), 45a9cf4 (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 mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_batch.h

    r85ff862 rf1d6866  
    3535#define DRV_OHCI_BATCH_H
    3636
     37#include <adt/list.h>
    3738#include <usbhc_iface.h>
    3839#include <usb/usb.h>
    39 #include <usb/host/device_keeper.h>
    40 #include <usb/host/endpoint.h>
    41 #include <usb/host/batch.h>
     40#include <usb/host/usb_transfer_batch.h>
    4241
    43 usb_transfer_batch_t * batch_get(
    44     ddf_fun_t *fun, endpoint_t *ep, char *buffer, size_t size,
    45     const char *setup_buffer, size_t setup_size,
    46     usbhc_iface_transfer_in_callback_t func_in,
    47     usbhc_iface_transfer_out_callback_t func_out,
    48     void *arg);
     42#include "hw_struct/transfer_descriptor.h"
     43#include "hw_struct/endpoint_descriptor.h"
    4944
    50 bool batch_is_complete(usb_transfer_batch_t *instance);
     45/** OHCI specific data required for USB transfer */
     46typedef struct ohci_transfer_batch {
     47        /** Link */
     48        link_t link;
     49        /** Endpoint descriptor of the target endpoint. */
     50        ed_t *ed;
     51        /** List of TDs needed for the transfer */
     52        td_t **tds;
     53        /** Number of TDs used by the transfer */
     54        size_t td_count;
     55        /** Dummy TD to be left at the ED and used by the next transfer */
     56        size_t leave_td;
     57        /** Data buffer, must be accessible by the OHCI hw. */
     58        char *device_buffer;
     59        /** Generic USB transfer structure */
     60        usb_transfer_batch_t *usb_batch;
     61} ohci_transfer_batch_t;
    5162
    52 void batch_commit(usb_transfer_batch_t *instance);
    53 
    54 void batch_control_write(usb_transfer_batch_t *instance);
    55 
    56 void batch_control_read(usb_transfer_batch_t *instance);
    57 
    58 void batch_interrupt_in(usb_transfer_batch_t *instance);
    59 
    60 void batch_interrupt_out(usb_transfer_batch_t *instance);
    61 
    62 void batch_bulk_in(usb_transfer_batch_t *instance);
    63 
    64 void batch_bulk_out(usb_transfer_batch_t *instance);
     63ohci_transfer_batch_t * ohci_transfer_batch_get(usb_transfer_batch_t *batch);
     64bool ohci_transfer_batch_is_complete(ohci_transfer_batch_t *batch);
     65void ohci_transfer_batch_commit(ohci_transfer_batch_t *batch);
     66void ohci_transfer_batch_finish_dispose(ohci_transfer_batch_t *batch);
     67/*----------------------------------------------------------------------------*/
     68static inline ohci_transfer_batch_t *ohci_transfer_batch_from_link(link_t *l)
     69{
     70        assert(l);
     71        return list_get_instance(l, ohci_transfer_batch_t, link);
     72}
    6573#endif
    6674/**
Note: See TracChangeset for help on using the changeset viewer.