Class GpioDevice

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

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

    • pinInfo

      protected PinInfo pinInfo
  • Constructor Details

    • GpioDevice

      public GpioDevice​(PinInfo pinInfo)
      Parameters:
      pinInfo - GPIO to which the device is connected
  • Method Details

    • getGpio

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