PxPeRelease()
Release the periodic event object.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxPe_t PxPeRelease (PxPe_t Pe); - ARGUMENTS
|
- RETURN VALUES
-
-
Invalid periodic event object on success
-
Periodic event object on failure
-
- ERROR CODES
-
PXERR_PE_ILLPEPeis not a valid periodic event handler objectPXERR_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
-
PxPeReleasestops the periodic event object Pe (if necessary) and releases the associated resources (allocated byPxPeRequest). After this call, Pe may not be used.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Pemust be a valid PXROS-HR periodic event object created with aPxPeRequestcall (V). The validity ofPemay also be checked by thePxPeIsValidmacro (F).
-
- After call
-
-
PxPeReleasereturns the periodic event object to the object pool it has been taken from. On successPxPeReleasereturns the invalidated periodic event object. This may be checked with one of the following macros:-
PxPeIdIsValid()must be false. -
PxPeIdGet()must be_PXIllegalObjId. -
PxPeIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxPeRelease, the given periodic event objectPeis no longer valid and may never be used as periodic event object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxPe_t Pe = PxPeRelease(Pe); if (PxPeIdError(Pe) == PXERR_NOERROR) { // Report error }