Skip to content

Most visited

Recently visited




public interface PwmDriver
implements Pwm

PWM user driver. A PwmDriver must implement all Pwm functions, but additionally this class provides an open() function that will be called whenever a process obtains ownership of the PWM, to match the existing close() function.


Public methods

abstract void close()

Closes the PWM.

default String getName()

Returns null.

abstract void open()

Opens the PWM.

Inherited methods

From interface
From interface
From interface java.lang.AutoCloseable

Public methods


void close ()

Closes the PWM. This will be called when the PWM is closed by its owner. Any resources that need to be cleaned up should be done so here. This method may throw IOException to indicate I/O failure, but will still be considered closed and may attempt to be re-opened in the future.

IOException on I/O failure; the driver will still be considered closed.


String getName ()

Returns null. I/O user drivers can be registered under any name so this returns null by default. Child classes may override this if other behavior is desired.



void open ()

Opens the PWM. This will be called when ownership of a PWM is obtained. The driver should do any initialization needed to configure the PWM for use here.

IOException on I/O failure; the driver will remain closed.
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)