USBLib_CreateAPCSWait (SWI &5634A) — Creates an APCS waiting structure
R0 | Pointer to APCS style routine to call |
R1 | r0 argument for routine in r0 |
R2 | r1 argument for routine in r1 |
R3 | r2 argument for routine in r2 |
R4 | r3 argument for routine in r3 |
Creates a waiting structure that can either be used as a waiting template or directly in calls like USBLib_SelectInterface (SWI &5635D) this most be freed using USBLib_FreeWait (SWI &5634D) or resources will be lost to the USB system.
The APCS function called upon transaction completion is called with:
R0-R3 | Arguments as passed to the create SWI |
R10 | Pointer to the end of the stack permiting the use of stack-limit checking. |
R11 | Set to a non useful value (NULL) not the frame pointer of the parent routine, this means backtrace is not be permited. |
R13 | A valid full descending stack (SVC stack). |
R14 | Return address |
The USB stack is currently compiled with a 26bit compiler so the entry point is currenty 26bit compatible (APCS R) if there is a need for 32bit usage please contact Simtec Electronics