Interface PwmOutputDeviceInterface

All Superinterfaces:
AutoCloseable, Closeable, DeviceInterface, GpioDeviceInterface
All Known Implementing Classes:
OdroidC2SysFsPwmOutputDevice, PiconZero.PiconZeroPwmOutputDevice, SoftwarePwmOutputDevice, SysFsPwmOutputDevice

public interface PwmOutputDeviceInterface
extends GpioDeviceInterface
  • Method Details

    • getPwmNum

      int getPwmNum()
      Get the device PWM output device number
      Returns:
      Device native PWM output
    • getValue

      float getValue() throws RuntimeIOException
      Get the current PWM output value (0..1)
      Returns:
      Range is 0..1
      Throws:
      RuntimeIOException - if an I/O error occurs
    • setValue

      void setValue​(float value) throws RuntimeIOException
      Set the PWM output value (0..1)
      Parameters:
      value - Relative value in the range 0..1
      Throws:
      RuntimeIOException - if an I/O error occurs
    • getMode

      default DeviceMode getMode()
      Specified by:
      getMode in interface GpioDeviceInterface