Package com.diozero.internal.spi
Interface PwmOutputDeviceInterface
- All Superinterfaces:
AutoCloseable
,Closeable
,DeviceInterface
,GpioDeviceInterface
- All Known Implementing Classes:
OdroidC2SysFsPwmOutputDevice
,PiconZero.PiconZeroPwmOutputDevice
,SoftwarePwmOutputDevice
,SysFsPwmOutputDevice
public interface PwmOutputDeviceInterface extends GpioDeviceInterface
-
Method Summary
Modifier and Type Method Description default DeviceMode
getMode()
int
getPwmNum()
Get the device PWM output device numberfloat
getValue()
Get the current PWM output value (0..1)void
setValue(float value)
Set the PWM output value (0..1)Methods inherited from interface com.diozero.api.DeviceInterface
close, getKey, isOpen
Methods inherited from interface com.diozero.internal.spi.GpioDeviceInterface
getGpio
-
Method Details
-
getPwmNum
int getPwmNum()Get the device PWM output device number- Returns:
- Device native PWM output
-
getValue
Get the current PWM output value (0..1)- Returns:
- Range is 0..1
- Throws:
RuntimeIOException
- if an I/O error occurs
-
setValue
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
- Specified by:
getMode
in interfaceGpioDeviceInterface
-