Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/ehci/ehci_batch.h


Ignore:
Timestamp:
2017-10-21T20:52:56Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
766043c
Parents:
74b852b
Message:

usbhost refactoring: let transfer_batch be initialized by bus

Currently makes older HCs fail, work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.h

    r74b852b r5fd9c30  
    4545/** EHCI specific data required for USB transfer */
    4646typedef struct ehci_transfer_batch {
     47        usb_transfer_batch_t base;
    4748        /** Link */
    4849        link_t link;
     
    5960} ehci_transfer_batch_t;
    6061
    61 ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *batch);
    62 bool ehci_transfer_batch_is_complete(const ehci_transfer_batch_t *batch);
     62ehci_transfer_batch_t * ehci_transfer_batch_create(endpoint_t *ep);
     63int ehci_transfer_batch_prepare(ehci_transfer_batch_t *batch);
    6364void ehci_transfer_batch_commit(const ehci_transfer_batch_t *batch);
    64 void ehci_transfer_batch_finish_dispose(ehci_transfer_batch_t *batch);
     65bool ehci_transfer_batch_check_completed(ehci_transfer_batch_t *batch);
     66void ehci_transfer_batch_destroy(ehci_transfer_batch_t *batch);
    6567
    6668static inline ehci_transfer_batch_t *ehci_transfer_batch_from_link(link_t *l)
     
    6971        return list_get_instance(l, ehci_transfer_batch_t, link);
    7072}
     73
     74static inline ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
     75{
     76        assert(usb_batch);
     77
     78        return (ehci_transfer_batch_t *) usb_batch;
     79}
     80
    7181#endif
    7282/**
Note: See TracChangeset for help on using the changeset viewer.