PxDelayResched_Pxhnd()

Schedule a delay job (handler service).

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxDelayResched_Pxhnd(PxDelay_t delay, PxTicks_t ticks, void PXFun_q (*handler)(PxArg_t), PxArg_t arg);
ARGUMENTS
delay

Delay job object.

ticks

Number of the PXROS-HR ticks after which the job is executed.

handler

Pointer to the handler function to be executed.

arg

Argument for the handler function

RETURN VALUES
  • PXERR_NOERROR if successful, or a PXROS-HR error code otherwise.

ERROR CODES

PXERR_DELAY_ILLDELAY

delay is not a valid delay handler

PXERR_REQUEST_ILLEGAL

The caller task is not the requester of the delay object

PXERR_TASK_ILLCALL

Task service called by the handler

DESCRIPTION

PxDelayResched_Pxhnd cancels a potential delay job associated with delay. If ticks is not zero, PXROS schedules activation of the handler call handler(arg) after ticks PXROS ticks and associates this delay job with delay object. The PxDelayResched_Pxhnd can only be called from handler level, otherwise PXERR_PXHND_ILLCALL error is returned.