Table A.9. Constants used for USB waiting modes
Definition | Value | Description |
---|---|---|
WAITING_TYPE_RETURN | 0 | Returns immediately. Program must check the state of the request periodically by calling USB_RequestGetState |
WAITING_TYPE_LOOP | 1 | Loops internally until the request has been finished. |
WAITING_TYPE_POLL | 2 | Waits until the request has been finished. WIMP is polled so other none interrupt driven tasks can use the CPU. This is only implemented for usage together with task windows. |
WAITING_TYPE_MESSAGE | 3 | Returns immediately. If request is finished a message using the values inside the waiting structure is sent. This will be done by calling Wimp_SendMessage. A user message without a reply will be generated. Destination task and icon handle will be taken from waiting structure. The message block will be also taken from the location stored inside the waiting parameters. This means that a program will have to fill this block located inside a part of common address space before launching an operation which will make usage of the waiting structure. The program must fill the message block in according with general WIMP restriction to such blocks. |
WAITING_TYPE_SWI | 4 | Returns immediately. If request is finished the SWI declared inside the waiting structure is launched. This is done by using the C-Function _kernel_swi. The SWI number is taken from the waiting structure. Also registers 0 to 9 are passed to this function. However results of the function call are dropped. |
WAITING_TYPE_APCS | 5 | Returns immediately. If request is finished a function which has been declared inside the waiting structure is called. The function must be located elsewhere in common address space. It must accord to ARM Procedure Call Standard (APCS). In fact call is done by calling a C-Function of the type int function(int, int, int, int). The 4 parameters are filled from the waiting structure. The result of the function is dropped. At Assembler side registers 0-3 will be filled according APCS. |