Changes in uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h [549ff23:c59dbdd5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
r549ff23 rc59dbdd5 65 65 */ 66 66 size_t setup_size; 67 /** Actually used portion of the buffer */68 size_t transfered_size;69 /** Indicates success/failure of the communication */70 int error;71 67 /** Host controller function, passed to callback function */ 72 68 ddf_fun_t *fun; 69 70 /** Actually used portion of the buffer 71 * This member is never accessed by functions provided in this header, 72 * with the exception of usb_transfer_batch_finish. For external use. 73 */ 74 size_t transfered_size; 75 /** Indicates success/failure of the communication 76 * This member is never accessed by functions provided in this header, 77 * with the exception of usb_transfer_batch_finish. For external use. 78 */ 79 int error; 73 80 74 81 /** Driver specific data */ … … 106 113 void usb_transfer_batch_destroy(const usb_transfer_batch_t *instance); 107 114 108 void usb_transfer_batch_finish (const usb_transfer_batch_t *instance,109 const void* data, size_t size );115 void usb_transfer_batch_finish_error(const usb_transfer_batch_t *instance, 116 const void* data, size_t size, int error); 110 117 /*----------------------------------------------------------------------------*/ 111 /** Override error value and finishes transfer.118 /** Finish batch using stored error value and transferred size. 112 119 * 113 120 * @param[in] instance Batch structure to use. 114 121 * @param[in] data Data to copy to the output buffer. 115 * @param[in] size Size of @p data.116 * @param[in] error Set batch status to this error value.117 122 */ 118 static inline void usb_transfer_batch_finish _error(119 usb_transfer_batch_t *instance, const void* data, size_t size, int error)123 static inline void usb_transfer_batch_finish( 124 const usb_transfer_batch_t *instance, const void* data) 120 125 { 121 126 assert(instance); 122 instance->error = error;123 usb_transfer_batch_finish(instance, data, size);127 usb_transfer_batch_finish_error( 128 instance, data, instance->transfered_size, instance->error); 124 129 } 125 130 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.