PxIntInstallFastContextHandler()

Install a fast interrupt handler handled in the context of the task.

APPLIES TO

1.0.0

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

The number of the interrupt for which the fast context 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 context interrupt handler to be installed

arg

Argument to fast context 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 context interrupt handler. This handler will be called in user mode with task protection of the installing task.

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 context interrupt handlers (PXACCESS_INSTALL_HANDLERS). (V)

SEE ALSO
USAGE
#include "pxdef.h"

PxError_t Err = PxIntInstallFastContextHandler(10, 1, interruptHandler, (PxArg_t) 0);

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