USB_TransactionGetPending (SWI&55392)
Prev | Chapter 2. Core SWI Calls | Next

## Name

USB_TransactionGetPending (SWI&55392) — Gets one of the remaining transactions of a request which consists of several transactions.

## On Entry

R0 | Pointer to pipe structure.
R1 | Reserved. Must be set to zero.
R2 | Reserved. Must be set to zero.

## On Exit

R0 | Pointer to transaction structure or zero if an error occurred or there are no following transactions to a request.
R1 | Error code Table A.1
R2 | Preserved

## Use

After USB host controller driver got the first transaction of a request by calling USB_RequestGetPending he must check whether the request consists of several transactions. This can be easily done by checking whether the pointer to the next transaction is not zero. If this is the case hs must call USB_TransactionGetPending to get the following transactions belonging to this request one after the other. The last transaction can be detected if it has a zero value inside the pointer to the next transaction or a zero pointer is returned by USB_TransactionGetPending.

There will be no further requests of a pipe notified to the USB host controller driver until he has got all transactions belonging to the actual request.

Note that a pipe may be cleared, dropped or something like this by another process at the time the USB host controller driver tries to get the remaining transactions. In this case the remaining transactions may be dropped before the USB host controller driver could get them. In this case a zero pointer will be returned and the USB host controller driver must drop all the transactions he has already got by finishing them calling USB_TransactionResult with a USB_TRANSACTION_RESULT_ABORTED result.

## Related SWI's

USB_RequestGetPending (SWI&55393)
USB_TransactionResult (SWI&55394)

Prev | Up | Next
USB_FrameSyncNumber (SWI&55391) | Home | USB_RequestGetPending (SWI&55393)