Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/xhci/transfers.h
- Timestamp:
- 2017-10-21T20:52:56Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 766043c
- Parents:
- 74b852b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/transfers.h
r74b852b r5fd9c30 34 34 */ 35 35 36 #ifndef XHCI_TRANSFERS_H 37 #define XHCI_TRANSFERS_H 38 39 #include <usb/host/usb_transfer_batch.h> 40 36 41 #include "hc.h" 37 42 #include "trb_ring.h" 38 43 39 44 typedef struct { 45 usb_transfer_batch_t batch; 40 46 link_t link; 41 47 42 uintptr_t interrupt_trb_phys;43 48 uint8_t direction; 44 49 45 usb_transfer_batch_t* batch; 50 void* hc_buffer; /* Virtual address of the buffer start. */ 51 uintptr_t hc_buffer_phys; 46 52 47 void* hc_buffer; /* Virtual address of the buffer start. */53 uintptr_t interrupt_trb_phys; 48 54 } xhci_transfer_t; 49 55 … … 51 57 void xhci_fini_transfers(xhci_hc_t*); 52 58 53 xhci_transfer_t* xhci_transfer_alloc(usb_transfer_batch_t*); 54 void xhci_transfer_fini(xhci_transfer_t*); 59 xhci_transfer_t* xhci_transfer_create(endpoint_t *); 60 int xhci_transfer_schedule(xhci_hc_t*, usb_transfer_batch_t *); 61 int xhci_handle_transfer_event(xhci_hc_t*, xhci_trb_t*); 62 void xhci_transfer_destroy(xhci_transfer_t*); 55 63 56 int xhci_handle_transfer_event(xhci_hc_t*, xhci_trb_t*); 64 static inline xhci_transfer_t *xhci_transfer_from_batch(usb_transfer_batch_t *batch) 65 { 66 assert(batch); 67 return (xhci_transfer_t *) batch; 68 } 57 69 58 int xhci_schedule_control_transfer(xhci_hc_t*, usb_transfer_batch_t*); 59 int xhci_schedule_bulk_transfer(xhci_hc_t*, usb_transfer_batch_t*); 60 int xhci_schedule_interrupt_transfer(xhci_hc_t*, usb_transfer_batch_t*); 61 int xhci_schedule_isochronous_transfer(xhci_hc_t* , usb_transfer_batch_t* ); 70 /** 71 * @} 72 */ 73 #endif
Note:
See TracChangeset
for help on using the changeset viewer.