avrora.sim.mcu
Class AtmelMicrocontroller.Pin
java.lang.Object
avrora.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.
Field Summary |
protected int |
number
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
number
protected final int number
AtmelMicrocontroller.Pin
protected AtmelMicrocontroller.Pin(int num)
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)