Lines Matching +full:transfer +full:- +full:function
119 .Sh USB TRANSFER MANAGEMENT FUNCTIONS
125 All the transfer types are managed using the following five functions:
130 This function will allocate memory for and initialise an array of USB
133 This function can sleep or block waiting for resources to become
141 is a pointer to an array of USB transfer pointers that are initialized
150 "xfer->priv_sc".
152 is the private mutex protecting the transfer structure and the
154 This pointer is used to initialize "xfer->priv_mtx".
155 This function returns zero upon success.
156 A non-zero return value indicates failure.
161 This function will release the given USB transfers and all allocated
164 is a pointer to an array of USB transfer pointers, that may be NULL,
170 This function can sleep waiting for USB transfers to complete.
172 This function is NULL safe with regard to the USB transfer structure
175 It is not allowed to call this function from the USB transfer
181 This function will start the USB transfer pointed to by
185 This function is always non-blocking and must be called with the
186 so-called private USB mutex locked.
188 This function is NULL safe with regard to the USB transfer structure
194 This function will stop the USB transfer pointed to by
198 This function is always non-blocking and must be called with the
199 so-called private USB mutex locked.
201 This function can return before the USB callback has been called.
203 This function is NULL safe with regard to the USB transfer structure
206 If the transfer was in progress, the callback will called with
212 This function will stop an USB transfer, if not already stopped and
216 safely be freed after that this function has returned.
218 This function can block the caller and will not return before the USB
221 This function is NULL safe with regard to the USB transfer structure
224 .Sh USB TRANSFER CALLBACK
234 The USB callback should not restart the USB transfer in case the error
239 That means one can start and stop whatever transfer from the callback
240 of another transfer one desires.
242 Also the transfer that is currently called back.
251 This function should only be called from within the USB callback and
254 An USB transfer can have multiple frames consisting of one or more USB
255 packets making up an I/O vector for all USB transfer types.
257 .Bd -literal -offset indent
297 An USB control transfer has three parts.
307 If an USB control transfer has no DATA stage,
312 .Bd -literal -offset indent
325 Example3: SETUP + DATA + STATUS - split
338 Example4: SETUP + STATUS - split
352 .Sh USB TRANSFER CONFIG
357 .Bd -literal -offset indent
388 A value of 0xFF, "-1" or "UE_ADDR_ANY" will select the first matching
405 Note that "UE_DIR_IN" refers to the data transfer direction of the
406 "IN" tokens and "UE_DIR_OUT" refers to the data transfer direction of
419 .Bl -tag -width "UE_ISOCHRONOUS"
428 "0" no transfer pre-delay.
433 NOTE: The transfer timeout, if any, is started after that the
434 pre-delay has elapsed!
439 field, if non-zero, will set the transfer timeout in milliseconds.
440 If the "timeout" field is zero and the transfer type is ISOCHRONOUS a
447 .Bl -tag -width "UE_INTERRUPT"
449 xfer->nframes = 1;
451 xfer->nframes = 1;
453 xfer->nframes = 2;
468 be used when setting up the given USB transfer.
473 flags an USB transfer.
475 .Bl -tag -width "force_short_xfer"
478 A short packet has a length of less than "xfer->max_packet_size", which
482 This flag allows the received transfer length, "xfer->actlen" to be
483 less than "xfer->sumlen" upon completion of a transfer.
492 This flag causes a failing USB transfer to remain first in the PIPE
493 queue except in the case of "xfer->error" equal to
497 .Bl -tag -width "X"
499 The failing USB transfer is stopped using "usbd_transfer_stop()".
501 The failing USB transfer performs a successful transfer.
505 transfer fails leading to the need for clearing of stall for
509 from being executed at the same time the clear-stall command is
522 rounded up to the nearest atomic hardware transfer size.
524 The maximum data length of any USB transfer is always stored in the
525 "xfer->max_data_length".
528 for the 8-bytes of SETUP header.
530 These 8-bytes are not counted by the "xfer->max_data_length"
547 end of the USB control transfer.
564 .Bl -tag -width "Device Side Mode"
567 belonging to this transfer before the transfer is started.
569 The transfer is started at the moment the host issues a clear-stall
574 Setting this flag will cause a clear-stall control request to be
575 executed on the endpoint before the USB transfer is started.
578 If this flag is changed outside the USB callback function you have to
585 During transfer setup the frames field is pre scaled with the corresponding value for the endpoint …
593 the "frames" field if the transfer type is ISOCHRONOUS.