Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/uhci/uhci_batch.h
- Timestamp:
- 2017-10-21T20:52:56Z (8 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/uhci/uhci_batch.h
r74b852b r5fd9c30 43 43 #include <stddef.h> 44 44 #include <usb/host/usb_transfer_batch.h> 45 #include <usb/host/endpoint.h> 45 46 46 47 #include "hw_struct/queue_head.h" … … 49 50 /** UHCI specific data required for USB transfer */ 50 51 typedef struct uhci_transfer_batch { 52 usb_transfer_batch_t base; 53 51 54 /** Queue head 52 55 * This QH is used to maintain UHCI schedule structure and the element … … 66 69 } uhci_transfer_batch_t; 67 70 68 uhci_transfer_batch_t * uhci_transfer_batch_get(usb_transfer_batch_t *batch); 69 void uhci_transfer_batch_finish_dispose(uhci_transfer_batch_t *uhci_batch); 70 bool uhci_transfer_batch_is_complete(const uhci_transfer_batch_t *uhci_batch); 71 uhci_transfer_batch_t * uhci_transfer_batch_create(endpoint_t *ep); 72 int uhci_transfer_batch_prepare(uhci_transfer_batch_t *uhci_batch); 73 bool uhci_transfer_batch_check_completed(uhci_transfer_batch_t *uhci_batch); 74 void uhci_transfer_batch_destroy(uhci_transfer_batch_t *uhci_batch); 71 75 72 76 /** Get offset to setup buffer accessible to the HC hw. … … 93 97 assert(uhci_batch->usb_batch); 94 98 return uhci_transfer_batch_setup_buffer(uhci_batch) + 95 uhci_batch->usb_batch->setup_size;99 (uhci_batch->base.ep->transfer_type == USB_TRANSFER_CONTROL ? USB_SETUP_PACKET_SIZE : 0); 96 100 } 97 101 … … 107 111 uhci_batch->usb_batch->error = EINTR; 108 112 uhci_batch->usb_batch->transfered_size = 0; 109 u hci_transfer_batch_finish_dispose(uhci_batch);113 usb_transfer_batch_finish(&uhci_batch->base); 110 114 } 111 115 … … 120 124 } 121 125 126 static inline uhci_transfer_batch_t *uhci_transfer_batch_get(usb_transfer_batch_t *b) 127 { 128 assert(b); 129 return (uhci_transfer_batch_t *) b; 130 } 131 122 132 #endif 123 133
Note:
See TracChangeset
for help on using the changeset viewer.