PxIntInstallFastHandler()

Install a fast interrupt handler.

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxIntInstallFastHandler (PxInt_t intno, PxUInt_t prio, PxIntHandler_t inthandler, PxArg_t arg);
ARGUMENTS
intno

The number of the interrupt for which the fast handler is installed

prio

Priority for interrupt controller. Two lowest priorities are reserved for the kernel. For information on the number of priorities, please refer to the device specification.

inthandler

The fast interrupt handler to be installed

arg

Argument for fast interrupt handler

RETURN VALUES
  • PXROS error code

ERROR CODES

PXERR_REQUEST_INVALID_PARAMETER

intno out of specification

PXERR_ACCESS_RIGHT

The calling task has not the right to install handlers

PXERR_INTR_ILL

The handler already installed from another task

PXERR_INTERRUPT_ILLINTERRUPT

intObj not valid interrupt object

PXERR_ILLEGAL_SERVICE_CALLED

Service invalid

DESCRIPTION

Installation of a C-function as fast interrupt handler. This handler will be called in supervisor mode with supervisor protection.

IMPLEMENTATION GUIDELINES
Before call
  • The parameter intno must be a valid interrupt id. (V)

  • inthandler must be a pointer to a interrupt handler function.(V)

After call
  • The function returns PXERR_NOERROR if the interrupt handler could be installed. Any other return value describes an error, which has to be interpreted (C).

Best Practice
  • The calling task must have the right to install fast interrupt handlers (PXACCESS_HANDLERS). (V)

SEE ALSO
USAGE
#include "pxdef.h"

PxError_t Err = PxIntInstallFastHandler(10, 1, InterruptHandler, (PxArg_t) 0);

if (Err != PXERR_NOERROR) {
    // Report error
}