Changeset c21e6a5 in mainline for uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
- Timestamp:
- 2018-02-05T00:54:08Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- af16ebe
- Parents:
- 65c059f
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-02-05 00:27:40)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-02-05 00:54:08)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
r65c059f rc21e6a5 41 41 #include <stddef.h> 42 42 #include <stdint.h> 43 #include <usb/dma_buffer.h> 43 44 #include <usb/request.h> 44 45 #include <usb/usb.h> … … 56 57 /** Target for communication */ 57 58 usb_target_t target; 59 /** Direction of the transfer */ 60 usb_direction_t dir; 58 61 59 62 /** Endpoint used for communication */ 60 63 endpoint_t *ep; 61 62 /** Direction of the transfer */63 usb_direction_t dir;64 65 /** Function called on completion */66 usbhc_iface_transfer_callback_t on_complete;67 /** Arbitrary data for the handler */68 void *on_complete_data;69 64 70 65 /** Place to store SETUP data needed by control transfers */ … … 75 70 } setup; 76 71 77 /** Place for data to send/receive*/78 char *buffer;79 /** Size of memory pointed to by buffer member */72 /** DMA buffer with enforced policy */ 73 dma_buffer_t dma_buffer; 74 /** Size of memory buffer */ 80 75 size_t buffer_size; 76 77 /** 78 * In case the DMA buffer is allocated, the original buffer must to be 79 * stored to be filled after the IN transaction is finished. 80 */ 81 char *original_buffer; 82 83 /** Indicates success/failure of the communication */ 84 errno_t error; 81 85 /** Actually used portion of the buffer */ 82 86 size_t transferred_size; 83 87 84 /** Indicates success/failure of the communication */ 85 errno_t error; 88 /** Function called on completion */ 89 usbhc_iface_transfer_callback_t on_complete; 90 /** Arbitrary data for the handler */ 91 void *on_complete_data; 86 92 } usb_transfer_batch_t; 87 93 … … 108 114 void usb_transfer_batch_init(usb_transfer_batch_t *, endpoint_t *); 109 115 116 /** Buffer preparation */ 117 errno_t usb_transfer_batch_prepare_buffer(usb_transfer_batch_t *, char *); 118 110 119 /** Batch finalization. */ 111 120 void usb_transfer_batch_finish(usb_transfer_batch_t *);
Note:
See TracChangeset
for help on using the changeset viewer.