avrora.sim.mcu
Class AtmelMicrocontroller.Pin

java.lang.Object
  extended byavrora.sim.mcu.AtmelMicrocontroller.Pin
All Implemented Interfaces:
Microcontroller.Pin
Enclosing class:
AtmelMicrocontroller

protected class AtmelMicrocontroller.Pin
extends java.lang.Object
implements Microcontroller.Pin

The Pin class implements a model of a pin on the ATMegaFamily for the general purpose IO ports.


Nested Class Summary
 
Nested classes inherited from class avrora.sim.mcu.Microcontroller.Pin
Microcontroller.Pin.Input, Microcontroller.Pin.Output
 
Field Summary
protected  int number
           
 
Constructor Summary
protected AtmelMicrocontroller.Pin(int num)
           
 
Method Summary
 void connect(Microcontroller.Pin.Input i)
          The connect() method will connect this pin to the specified input.
 void connect(Microcontroller.Pin.Output o)
          The connect() method will connect this pin to the specified output.
protected  boolean read()
           
protected  void setOutputDir(boolean out)
           
protected  void setPullup(boolean pull)
           
protected  void write(boolean value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

number

protected final int number
Constructor Detail

AtmelMicrocontroller.Pin

protected AtmelMicrocontroller.Pin(int num)
Method Detail

connect

public void connect(Microcontroller.Pin.Output o)
Description copied from interface: Microcontroller.Pin
The connect() method will connect this pin to the specified output. Attempts by the microcontroller to write to this pin when it is configured as an output will then call this instance's write() method.

Specified by:
connect in interface Microcontroller.Pin
Parameters:
o - the Output instance to connect to

connect

public void connect(Microcontroller.Pin.Input i)
Description copied from interface: Microcontroller.Pin
The connect() method will connect this pin to the specified input. Attempts by the microcontroller to read from this pin when it is configured as an input will then call this instance's read() method.

Specified by:
connect in interface Microcontroller.Pin
Parameters:
i - the Input instance to connect to

setOutputDir

protected void setOutputDir(boolean out)

setPullup

protected void setPullup(boolean pull)

read

protected boolean read()

write

protected void write(boolean value)