PxDelayRelease()
Release a delay object.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxDelay_t PxDelayRelease (PxDelay_t Delay); - ARGUMENTS
|
- RETURN VALUES
-
-
Invalid delay handle on success
-
Delay on failure
-
- ERROR CODES
-
PXERR_DELAY_ILLDELAYDelay is not a valid delay object
PXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
PXERR_DELAY_USED_BY_INTERRUPTDelay object currently in use by the interrupt handler
PXERR_OPOOL_ILLOPOOLThe object pool is not valid
PXERR_TASK_ILLTASKThe task is not a valid task object
PXERR_INTERNAL_INCONSISTENCYInconsistency of internal structures
- DESCRIPTION
-
PxDelayReleasereleases the delay job handle Delay by converting it into a generic object and releasing this object. If Delay is in use, the corresponding job is canceled.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Delaymust be a valid PXROS-HR delay object created with aPxDelayRequestcall (V). The validity ofDelaymay also be checked by thePxDelayIsValidmacro (F). The delay object must be created on the same core as the caller runs on. The creator core id can be read with the macroPxDelayCoreIdand the own core id withPxGetCoreId(C).
-
- After call
-
-
PxDelayReleasereturns the delay object to the object pool it has been taken from. On successPxDelayReleasereturns the invalidated delay object. This may be checked with one of the following macros:-
PxDelayIdIsValid()must be false. -
PxDelayIdGet()must not be_PXIllegalObjId. -
PxDelayIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxDelayRelease, the given delay objectDelayis no longer valid and may never be used as delay object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxDelay_t Delay = PxDelayRelease(Delay); if PxDelayIdError(Delay) == PXERR_NOERROR) { // Report error }