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_ILLINTERRUPT
The given object is no interrupt object
PXERR_PROT_PERMISSION
The task has no write permission on the
InterruptInfo
object - DESCRIPTION
-
PxSysInfoGetInterruptInfo stores the contents of the interrupt structure interruptId into the info structure InterruptInfo. The structure InterruptInfo has 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 sysinfo types:
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
-
-
InterruptInfo
must be a pointer to a valid data area. -
interruptId
must be a valid PXROS-HR interrupt object created with aPxInterruptRequest
call (V). The validity ofinterruptId
may also be checked by thePxInterruptIsValid
macro (F).
-
- After call
-
-
The function returns
PXERR_NOERROR
if 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 }