: Class ExternalInterrupt

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.dalsemi.system
Class ExternalInterrupt

    java.lang.Object
      |
      +--com.dalsemi.system.ExternalInterrupt

public class ExternalInterrupt
extends Object

This class allows an application to manage external interrupts received by TINI. External interrupts can be used to respond to external events such as a push button being pressed. The interrupt can be configured to be falling edge triggered or low level triggered. Resources for external interrupts are shared with TINI's external serial ports and the parallel port interrupt circuitry that may exist on some socket boards.

See Also:
  `ExternalInterruptEvent`, `ExternalInterruptEventListener`, `ExternalInterruptException`

Constructor Summary
`ExternalInterrupt()`

Method Summary
`void` | `addEventListener(ExternalInterruptEventListener externalEventListener)` Adds an event listener to TINI's external interrupt event chain.
`static boolean` | `getTrigger()` Gets the current trigger state.
`void` | `removeEventListener(ExternalInterruptEventListener externalEventListener)` Removes an event listener from TINI's external interrupt event chain.
`static void` | `setTrigger(boolean edgeTrigger, ExternalInterruptEventListener owner)` Sets the external interrupt trigger state to edge or level triggered.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExternalInterrupt

    public ExternalInterrupt()

Method Detail

### addEventListener

    public void addEventListener(ExternalInterruptEventListener externalEventListener)
                          throws TooManyListenersException

  Adds an event listener to TINI's external interrupt event chain.
  Parameters:
    `externalEventListener` - reference to the class that will be added to the listener chain
  Throws:
    TooManyListenersException - if no more listiners can be added

### removeEventListener

    public void removeEventListener(ExternalInterruptEventListener externalEventListener)

  Removes an event listener from TINI's external interrupt event chain.
  Parameters:
    `externalEventListener` - reference to the class that will be removed from the listener chain

### setTrigger

    public static void setTrigger(boolean edgeTrigger,
                                  ExternalInterruptEventListener owner)
                           throws ExternalInterruptException

  Sets the external interrupt trigger state to edge or level triggered.
  Parameters:
    `edgeTrigger` - set to true for edge triggering or false for level triggering
    `owner` - reference to ExternalInterruptEventListener that wants to change the trigger. Once the trigger is owned the owner is the only object that can change the trigger.
  Throws:
    ExternalInterruptException - if triggering is owned by another listener in the current process, by another process or by the external serial ports

### getTrigger

    public static boolean getTrigger()

  Gets the current trigger state.
  Returns:
    true if edge triggered and false if level triggered

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD