Changeset df6ded8 in mainline for uspace/drv/bus/usb/ohci/ohci_batch.h
- Timestamp:
- 2018-02-28T16:37:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b20da0
- Parents:
- f5e5f73 (diff), b2dca8de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
- git-committer:
- Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_batch.h
rf5e5f73 rdf6ded8 1 1 /* 2 2 * Copyright (c) 2011 Jan Vesely 3 * Copyright (c) 2018 Ondrej Hlavaty 3 4 * All rights reserved. 4 5 * … … 38 39 #include <assert.h> 39 40 #include <stdbool.h> 41 #include <usb/dma_buffer.h> 40 42 #include <usb/host/usb_transfer_batch.h> 41 43 … … 45 47 /** OHCI specific data required for USB transfer */ 46 48 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; 49 usb_transfer_batch_t base; 50 53 51 /** Number of TDs used by the transfer */ 54 52 size_t td_count; 55 /** Data buffer, must be accessible by the OHCI hw. */ 56 char *device_buffer; 57 /** Generic USB transfer structure */ 58 usb_transfer_batch_t *usb_batch; 53 54 /** 55 * List of TDs needed for the transfer - together with setup data 56 * backed by the dma buffer. Note that the TD pointers are pointing to 57 * the DMA buffer initially, but as the scheduling must use the first TD 58 * from EP, it is replaced. 59 */ 60 td_t **tds; 61 char *setup_buffer; 62 char *data_buffer; 63 64 dma_buffer_t ohci_dma_buffer; 59 65 } ohci_transfer_batch_t; 60 66 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);67 ohci_transfer_batch_t *ohci_transfer_batch_create(endpoint_t *batch); 68 int ohci_transfer_batch_prepare(ohci_transfer_batch_t *ohci_batch); 63 69 void ohci_transfer_batch_commit(const ohci_transfer_batch_t *batch); 64 void ohci_transfer_batch_finish_dispose(ohci_transfer_batch_t *batch); 70 bool ohci_transfer_batch_check_completed(ohci_transfer_batch_t *batch); 71 void ohci_transfer_batch_destroy(ohci_transfer_batch_t *ohci_batch); 65 72 66 static inline ohci_transfer_batch_t *ohci_transfer_batch_from_link(link_t *l) 73 static inline ohci_transfer_batch_t *ohci_transfer_batch_get( 74 usb_transfer_batch_t *usb_batch) 67 75 { 68 assert(l); 69 return list_get_instance(l, ohci_transfer_batch_t, link); 76 assert(usb_batch); 77 78 return (ohci_transfer_batch_t *) usb_batch; 70 79 } 80 71 81 #endif 72 82 /**
Note:
See TracChangeset
for help on using the changeset viewer.