USB_TransactionResult (SWI&55394)
Prev | Chapter 2. Core SWI Calls | Next

## Name

USB_TransactionResult (SWI&55394) — Passes the control over a transaction back to the USB module with a result.

## On Entry

R0 | Pointer to transaction structure.
R1 | Pointer to transaction result. It is a pointer because the result may be changed by the function.
R2 | Reserved. Must be set to zero.
R3 | Reserved. Must be set to zero.

## On Exit

R0 | preserved
R1 | Error code Table A.1
R2, R3 | Preserved

## Use

Note that the result to which R1 was pointing to on entry may have changed!

This function passes the control over a given transaction back from USB host controller driver to the USB module with a result according to Table A.3 containing the constants of request states. If result is OK USB module will check the size of data insize the data buffer whether transaction has been an receiving one and transaction information flag for exact size has been set. If the size differs from the expected one the USB module will change to result to the according error. If an error is detected (by the USB host controller driver directly or by the USB module) the USB host controller driver must finish the remaining transactions for the same request with the same error. If the pipe of the request is not a default pipe and a transaction is finished with an error the pipe is automatically halted by the USB module.

If USB host controller driver detects at a transaction that it has been canceled he is free in the decision how to continue. It can transfer the transaction or abort it. If transfer has been already done when cancel is detected the USB controller should give the real result of the transaction. This allows the application to decide what transactions has been seen by the device last.

The USB host controller driver must also fill in frame number and data toggle state directly into the according buffer fields as they are set as the last operation to the data buffer is done.

## Related SWI's

USB_TransactionGetPending (SWI&55392)
USB_RequestGetPending (SWI&55393)

Prev | Up | Next
USB_RequestGetPending (SWI&55393) | Home | USB_FastAccessInformation (SWI&55395)