PwmDriver

public abstract class PwmDriver
extends Pwm

java.lang.Object
   ↳ com.google.android.things.pio.Pwm
     ↳ com.google.android.things.pio.PwmDriver


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.

Summary

Public constructors

PwmDriver()

Public methods

abstract void close()

Closes the PWM.

abstract void open()

Opens the PWM.

Inherited methods

From class com.google.android.things.pio.Pwm
From class java.lang.Object
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Public constructors

PwmDriver

</div>

PwmDriver ()

</div>

Public methods

close

</div>

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.</p>

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

</div>

open

</div>

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.</p>

Throws
IOException on I/O failure; the driver will remain closed.

</div>

results matching ""

    No results matching ""