dioscuri.module
Class ModulePIC

java.lang.Object
  extended by dioscuri.module.AbstractModule
      extended by dioscuri.module.ModulePIC
All Implemented Interfaces:
Addressable, Module
Direct Known Subclasses:
PIC

public abstract class ModulePIC
extends AbstractModule
implements Addressable

Abstract class representing a generic PIC module.


Nested Class Summary
 
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
Module.Type
 
Field Summary
 
Fields inherited from class dioscuri.module.AbstractModule
type
 
Constructor Summary
ModulePIC()
           
 
Method Summary
abstract  void clearIRQ(int irqNumber)
          Lowers an interrupt request (IRQ) of given IRQ number
abstract  int interruptAcknowledge()
          Acknowledges an interrupt request from PIC by CPU Note: only the CPU can acknowledge an interrupt
abstract  int requestIRQNumber(AbstractModule module)
          Returns an IRQ number.
abstract  void setIRQ(int irqNumber)
          Raises an interrupt request (IRQ) of given IRQ number
 
Methods inherited from class dioscuri.module.AbstractModule
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, reset, setConnection, setDebugMode, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dioscuri.interfaces.Addressable
getIOPortByte, getIOPortDoubleWord, getIOPortWord, setIOPortByte, setIOPortDoubleWord, setIOPortWord
 
Methods inherited from interface dioscuri.interfaces.Module
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, reset, setConnection, setDebugMode, start, stop
 

Constructor Detail

ModulePIC

public ModulePIC()
Method Detail

requestIRQNumber

public abstract int requestIRQNumber(AbstractModule module)
Returns an IRQ number.

Parameters:
module - that would like to have an IRQ number
Returns:
int IRQ number between 1 to 16, or -1 if not allowed/possible

clearIRQ

public abstract void clearIRQ(int irqNumber)
Lowers an interrupt request (IRQ) of given IRQ number

Parameters:
irqNumber -

setIRQ

public abstract void setIRQ(int irqNumber)
Raises an interrupt request (IRQ) of given IRQ number

Parameters:
irqNumber -

interruptAcknowledge

public abstract int interruptAcknowledge()
Acknowledges an interrupt request from PIC by CPU Note: only the CPU can acknowledge an interrupt

Returns:
int address defining the jump address for handling the IRQ by the CPU