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


Ignore:
Timestamp:
2017-10-21T20:52:56Z (6 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/ohci/ohci_batch.h

    r74b852b r5fd9c30  
    4545/** OHCI specific data required for USB transfer */
    4646typedef struct ohci_transfer_batch {
     47        usb_transfer_batch_t base;
     48
    4749        /** Link */
    4850        link_t link;
     
    5961} ohci_transfer_batch_t;
    6062
    61 ohci_transfer_batch_t * ohci_transfer_batch_get(usb_transfer_batch_t *batch);
    62 bool ohci_transfer_batch_is_complete(const ohci_transfer_batch_t *batch);
     63ohci_transfer_batch_t * ohci_transfer_batch_create(endpoint_t *batch);
     64int ohci_transfer_batch_prepare(ohci_transfer_batch_t *ohci_batch);
    6365void ohci_transfer_batch_commit(const ohci_transfer_batch_t *batch);
    64 void ohci_transfer_batch_finish_dispose(ohci_transfer_batch_t *batch);
     66bool ohci_transfer_batch_check_completed(ohci_transfer_batch_t *batch);
     67void ohci_transfer_batch_destroy(ohci_transfer_batch_t *ohci_batch);
    6568
    6669static inline ohci_transfer_batch_t *ohci_transfer_batch_from_link(link_t *l)
     
    6972        return list_get_instance(l, ohci_transfer_batch_t, link);
    7073}
     74
     75static inline ohci_transfer_batch_t * ohci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
     76{
     77        assert(usb_batch);
     78
     79        return (ohci_transfer_batch_t *) usb_batch;
     80}
     81
    7182#endif
    7283/**
Note: See TracChangeset for help on using the changeset viewer.