Changeset 45bf63c in mainline for uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
- Timestamp:
- 2011-10-30T15:35:36Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 20a3465, 3ce78580
- Parents:
- 1737bfb (diff), e978ada (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
r1737bfb r45bf63c 43 43 #define USB_SETUP_PACKET_SIZE 8 44 44 45 typedef struct usb_transfer_batch usb_transfer_batch_t;46 45 /** Structure stores additional data needed for communication with EP */ 47 struct usb_transfer_batch {46 typedef struct usb_transfer_batch { 48 47 /** Endpoint used for communication */ 49 48 endpoint_t *ep; … … 77 76 /** Callback to properly remove driver data during destruction */ 78 77 void (*private_data_dtor)(void *p_data); 79 } ;78 } usb_transfer_batch_t; 80 79 81 80 /** Printf formatting string for dumping usb_transfer_batch_t. */ … … 93 92 94 93 95 usb_transfer_batch_t * usb_transfer_batch_ get(94 usb_transfer_batch_t * usb_transfer_batch_create( 96 95 endpoint_t *ep, 97 96 char *buffer, … … 105 104 void (*private_data_dtor)(void *p_data) 106 105 ); 106 void usb_transfer_batch_destroy(const usb_transfer_batch_t *instance); 107 107 108 void usb_transfer_batch_finish( usb_transfer_batch_t *instance,108 void usb_transfer_batch_finish(const usb_transfer_batch_t *instance, 109 109 const void* data, size_t size); 110 void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);111 void usb_transfer_batch_call_out(usb_transfer_batch_t *instance);112 void usb_transfer_batch_dispose(usb_transfer_batch_t *instance);113 114 /** Helper function, calls callback and correctly destroys batch structure.115 *116 * @param[in] instance Batch structure to use.117 */118 static inline void usb_transfer_batch_call_in_and_dispose(119 usb_transfer_batch_t *instance)120 {121 assert(instance);122 usb_transfer_batch_call_in(instance);123 usb_transfer_batch_dispose(instance);124 }125 110 /*----------------------------------------------------------------------------*/ 126 /** Helper function calls callback and correctly destroys batch structure. 127 * 128 * @param[in] instance Batch structure to use. 129 */ 130 static inline void usb_transfer_batch_call_out_and_dispose( 131 usb_transfer_batch_t *instance) 132 { 133 assert(instance); 134 usb_transfer_batch_call_out(instance); 135 usb_transfer_batch_dispose(instance); 136 } 137 /*----------------------------------------------------------------------------*/ 138 /** Helper function, sets error value and finishes transfer. 111 /** Override error value and finishes transfer. 139 112 * 140 113 * @param[in] instance Batch structure to use. … … 151 124 } 152 125 /*----------------------------------------------------------------------------*/ 153 /** Helper function, determines batch direction absed on the present callbacks154 * @param[in] instance Batch structure to use .126 /** Determine batch direction based on the callbacks present 127 * @param[in] instance Batch structure to use, non-null. 155 128 * @return USB_DIRECTION_IN, or USB_DIRECTION_OUT. 156 129 */
Note:
See TracChangeset
for help on using the changeset viewer.