USBLib_CreateAPCSWait (SWI &5634A)

USBLib_CreateAPCSWait (SWI &5634A) — Creates an APCS waiting structure

On Entry

R0Pointer to APCS style routine to call
R1r0 argument for routine in r0
R2r1 argument for routine in r1
R3r2 argument for routine in r2
R4r3 argument for routine in r3

On Exit

R0Pointer to waiting

Use

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-R3Arguments as passed to the create SWI
R10 Pointer to the end of the stack permiting the use of stack-limit checking.
R11Set to a non useful value (NULL) not the frame pointer of the parent routine, this means backtrace is not be permited.
R13A valid full descending stack (SVC stack).
R14Return 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

Related SWIs

USBLib_FreeWait (SWI &5634D)

USBLib_CloneWait (SWI &56345)

Related Information

Chapter 6, Waiting