Class GpioDevice

java.lang.Object
com.diozero.api.GpioDevice
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
DigitalOutputDevice, GpioInputDevice, PwmOutputDevice, Servo

public abstract class GpioDevice
extends Object
implements Closeable
Abstract base class for all GPIO related devices.
  • Field Details

    • gpio

      protected int gpio
  • Constructor Details

    • GpioDevice

      public GpioDevice​(int gpio)
      Parameters:
      gpio - GPIO to which the device is connected.
  • Method Details

    • getGpio

      public int getGpio()
      Get the GPIO for this device.
      Returns:
      GPIO for this device.