PxToChange()
Change the timeout and events associated with To.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxToChange (PxTo_t To, PxTicks_t timeout, PxEvents_t events);
- ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_REQUEST_ILLEGAL
The caller is not the requester of the
To
objectPXERR_TO_ILLTO
To
is not a valid timeout object - DESCRIPTION
-
PxToChange changes the timeout and events associated with To. It implicitly stops To.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
ToId
must be a valid PXROS-HR timeout object created with aPxToRequest
call (V). The validity ofToId
may also be checked by thePxToIsValid
macro (F). -
The
timeout
parameter must have a plausible value. It should be a constant or the result of aPxTickGetTicksFromMilliSeconds
call (V); -
The parameter
events
contains an event bit and should not be zero. Typically the event is a constant (V).
-
- After call
-
-
The function returns
PXERR_NOERROR
if the timout could be changed. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" #define MY_EVENT_MASK 0x1l PxError_t Err = PxToChange(To, 5, MY_EVENT_MASK); if (Err != PXERR_NOERROR) { // Report error }