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

## avrora.sim.mcu
Class ATMegaFamily.Pin

    java.lang.Object
      avrora.sim.mcu.ATMegaFamily.Pin

All Implemented Interfaces:
  Microcontroller.Pin

Enclosing class:
  ATMegaFamily

protected class ATMegaFamily.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` | `ATMegaFamily.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

### ATMegaFamily.Pin

    protected ATMegaFamily.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)

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