MityDSP Documentation Index

tcDspInterruptDispatch

Introduction

The tcDspInterruptDispatch static class is used to manage the installation of multiple ISRs at the four available external interrupt levels on the MityDSP. Interrupt handlers may be associated with a specified vector (each MityDSP firmware core provides a vector when it raises an interrupt), or it may be chained to support devices that do not use the vectoring scheme.

The register method allows application software to register an ISR (and one argument) to be associated with a given interrupt level (4-7) and vector (0-31 or gnChainVector). The tcDspInterruptDispatch dispatcher is then installed as the DSP BIOS interrupt handler. When activated, the dispatcher calls all registered ISR's based upon the current Vector Mask Register settings in the MityDSP firmware ("chanined" ISR's are called regardless of vector mask).

The unregister method removes a previous registration.

See also:
MityDSP::tcDspInterruptDispatch Class Reference

Example

This is a simple example of tcDspInterruptDispatch usage:

 {
     int myLevel  = 6;
     int myVector = 17;

     ...

     // register this instance's ISR
     tcDspInterruptDispatch::register
         (myLevel, myVector, myIsrDispatcher, (Arg)this);

     // application must enable interrupts of interest
     tcDspFirmware::global_int_enable (IE_MASK_6);

     ...
  } 

  int 
  tcMyClass::myIsrDispatcher(Arg ahMyObject)
  {
      ((tcMyClass *)ahMyObject)->myISR();

      return (0);
  } 

  
Generated on Fri Sep 23 16:33:45 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.