USB_RequestGetState (SWI&55390) — Checks the actual state of a request.
R0 | Pointer to waiting structure. |
R1 | Reserved. Must be set to zero. |
R2 | Reserved. Must be set to zero. |
R0 | preserved |
R1 | Error code Table A.1 |
R2 | Request result |
This call is used to determine the state of a tranasction started with USB_RequestStart (SWI&5538F). The returned result should be examined and apropriate action taken. The request states Table A.3 indicate the condition of the transaction.
The two main result conditions of interest are USB_TRANSACTION_RESULT_OK which indicates a succesfuly completed transaction in which the data has been transfered as requested and USB_TRANSACTION_RESULT_WORKING which indicates the transaction has not yet completed, this allows the driver to yeild the CPU to other tasks if required. All other result codes indicate an error condition of some kind which may or may not halt the pipe or have other effects, the driver must interpret these in a driver specific manner.
It is necisary to use this call to retrive the state of a transaction, even if a "blocking" waiting mode was used to start the transaction, if the driver wishes to discover error conditions.