PxInterruptRelease()
Release an interrupt object.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxInterrupt_t PxInterruptRelease (PxInterrupt_t Interrupt); - ARGUMENTS
|
- RETURN VALUES
-
-
Invalid interrupt object on success
-
Interrupt object on failure
-
- ERROR CODES
-
PXERR_INTERRUPT_ILLINTERRUPTInterrupt is not a valid interrupt object
PXERR_OPOOL_ILLOPOOLNot a valid object pool
PXERR_GLOBAL_ILLEGAL_COREthe requested object pool is not on the same core
PXERR_TASK_ILLTASKnot a valid task object
PXERR_INTERNAL_INCONSISTENCYallocated object not convertible
- DESCRIPTION
-
PxInterruptReleasereleases the interrupt object Interrupt by converting it into a generic object and releasing this object.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Interruptmust be a valid PXROS-HR interrupt object created with aPxInterruptRequestcall (V). The validity ofInterruptmay also be checked by thePxInterruptIsValidmacro (F).
-
- After call
-
-
PxInterruptReleasereturns the interrupt object to the object pool it has been taken from. On successPxInterruptReleasereturns the invalidated interrupt object. This may be checked with one of the following macros:-
PxInterruptIdIsValid()must be false. -
PxInterruptIdGet()must be_PXIllegalObjId. -
PxInterruptIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxInterruptRelease, the given interrupt objectInterruptis no longer valid and may never be used as interrupt object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxInterrupt_t Interrupt = PxInterruptRelease(Interrupt); if (PxInterruptIdError(Interrupt) == PXERR_NOERROR) { // Report error }