Everything

ref_tsk

Outline
Reference task state.
C format
 ER      ref_tsk ( ID tskid, T_RTSK *pk_rtsk );

Assembly format
 MOVW    BC, #LOWW(_pk_rtsk)
 MOV     A,  #tskid
 CALL    !!_ref_tsk

Parameter(s)
I/O
Parameter
Description
I
 ID      tskid;
ID number of the task to be referenced.
TSK_SELF: Invoking task.
Value: ID number of the task to be referenced.
O
 T_RTSK  *pk_rtsk;
Pointer to the packet returning the task state.

Explanation
Stores task state packet (such as current status) of the task specified by parameter tskid in the area specified by parameter pk_rtsk.
Note For details about the task state packet, refer to "12.5.1 Task state packet".
Return value
Macro
Value
Description
E_OK
0
Normal completion.