Changeset 9c10e51 in mainline for uspace/drv/bus/usb/ohci/ohci_batch.h
- Timestamp:
- 2011-08-31T22:50:21Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4e9ecf4
- Parents:
- f18d82f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_batch.h
rf18d82f0 r9c10e51 35 35 #define DRV_OHCI_BATCH_H 36 36 37 #include <adt/list.h> 37 38 #include <usbhc_iface.h> 38 39 #include <usb/usb.h> 39 #include <usb/host/device_keeper.h>40 #include <usb/host/endpoint.h>41 40 #include <usb/host/batch.h> 42 41 43 int batch_init_ohci(usb_transfer_batch_t *batch); 44 bool batch_is_complete(usb_transfer_batch_t *batch); 45 void batch_commit(usb_transfer_batch_t *batch); 42 #include "hw_struct/transfer_descriptor.h" 43 #include "hw_struct/endpoint_descriptor.h" 44 45 /** OHCI specific data required for USB transfer */ 46 typedef 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; 62 63 ohci_transfer_batch_t * ohci_transfer_batch_get(usb_transfer_batch_t *batch); 64 bool ohci_transfer_batch_is_complete(ohci_transfer_batch_t *batch); 65 void ohci_transfer_batch_commit(ohci_transfer_batch_t *batch); 66 void ohci_transfer_batch_finish_dispose(ohci_transfer_batch_t *batch); 67 /*----------------------------------------------------------------------------*/ 68 static 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 } 46 73 #endif 47 74 /**
Note:
See TracChangeset
for help on using the changeset viewer.