_PxHndcall()

PXROS-HR handler call.

APPLIES TO

8.2.0

SYNOPSIS
PxArg_t _PxHndcall (handler, task, varsize, parms...);
ARGUMENTS
handler

Function to be called in supervisor mode

task

Calling task

varsize

Total size of the arguments in bytes

parms…​

Arguments for handler function

DESCRIPTION

_PxHndcall calls the passed function handler with its arguments parms…​ in supervisor mode. Since the function is executed in the context of the calling task using the task stack, the function can only access data of the task context.

USAGE
#include "pxdef.h"

#define UNUSED_TID 0 // TASK ID - argument not used
#define UNUSED_VARSIZE 0 // VARIABLE SIZE - argument not used

int HandlerFunc(int arg1) {
 return arg1;
}

PxArg_t retVal = _PxHndcall(HandlerFunc, UNUSED_TID, UNUSED_VARSIZE, 0);