PxSysInfoGetInterruptInfo()
Function to get interrupt info.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxSysInfoGetInterruptInfo (PxInfoInterrupt_t *InterruptInfo, PxInterrupt_t interruptId); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_INTERRUPT_ILLINTERRUPTThe given object is no interrupt object
PXERR_PROT_PERMISSIONThe task has no write permission on the
InterruptInfoobject - DESCRIPTION
-
PxSysInfoGetInterruptInfostores the contents of the interrupt structureinterruptIdinto the info structureInterruptInfo. The structureInterruptInfohas the following format:typedef struct { PxUInt_t PxInfoInterrupt_Number; // interrupt number void (*PxInfoInterrupt_Handler) (PxArg_t); // interrupt handler function PxULong_t PxInfoInterrupt_Param; //interrupt handler function’s arguments PxTask_t PxInfoInterrupt_RequestingTask; // task which requested the interrupt object } PxInfoInterrupt_t;There is a union available containing all
sysinfotypes:typedef union { PxInfoMC_t McInfo; // memory class information struct PxInfoOpool_t OpoolInfo; // Opool information struct PxInfoMsg_t MsgInfo; // message information struct PxInfoMbx_t MbxInfo; // mailbox information struct PxInfoDelay_t DelayInfo; // delay object information struct PxInfoPe_t PeInfo; // periodic event information struct PxInfoTo_t ToInfo; // timeout object information struct PxInfoInterrupt_t InterruptInfo; // interrupt object information struct } PxObjInfo_T;
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
InterruptInfomust be a pointer to a valid data area. -
interruptIdmust be a valid PXROS-HR interrupt object created with aPxInterruptRequestcall (V). The validity ofinterruptIdmay also be checked by thePxInterruptIsValidmacro (F).
-
- After call
-
-
The function returns
PXERR_NOERRORif the system information could be delivered. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
No restrictions
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxError_t err = PxSysInfoGetInterruptInfo(&InterruptInfo, interruptId); if (err == PXERR_NOERROR) { // Handle info } else { // Report error }