IPwmControllerProvider IPwmControllerProvider IPwmControllerProvider IPwmControllerProvider Interface

Definition

Represents properties and methods common to all PWM controllers.

public : interface IPwmControllerProviderpublic interface IPwmControllerProviderPublic Interface IPwmControllerProvider// You can use this interface in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)

Properties

ActualFrequency ActualFrequency ActualFrequency ActualFrequency

Gets the actual frequency of the PWM.

public : double ActualFrequency { get; }public double ActualFrequency { get; }Public ReadOnly Property ActualFrequency As double// You can use this property in JavaScript.
Value
double double double double

The frequency in Hz.

MaxFrequency MaxFrequency MaxFrequency MaxFrequency

Gets the maximum frequency offered by the controller.

public : double MaxFrequency { get; }public double MaxFrequency { get; }Public ReadOnly Property MaxFrequency As double// You can use this property in JavaScript.
Value
double double double double

The maximum frequency in Hz.

MinFrequency MinFrequency MinFrequency MinFrequency

Gets the minimum frequency offered by the controller.

public : double MinFrequency { get; }public double MinFrequency { get; }Public ReadOnly Property MinFrequency As double// You can use this property in JavaScript.
Value
double double double double

The minimum frequency in Hz.

PinCount PinCount PinCount PinCount

Gets the number of PWM pins available on the system.

public : int PinCount { get; }public int PinCount { get; }Public ReadOnly Property PinCount As int// You can use this property in JavaScript.
Value
int int int int

The number of pins available.

Methods

AcquirePin(Int32) AcquirePin(Int32) AcquirePin(Int32) AcquirePin(Int32)

Acquires the specified pin and opens that pin for use.

public : void AcquirePin(int pin)public void AcquirePin(Int32 pin)Public Function AcquirePin(pin As Int32) As void// You can use this method in JavaScript.
Parameters
pin
int Int32 Int32 Int32

Which pin to open a PWM connection to.

DisablePin(Int32) DisablePin(Int32) DisablePin(Int32) DisablePin(Int32)

Stops the PWM on this pin.

public : void DisablePin(int pin)public void DisablePin(Int32 pin)Public Function DisablePin(pin As Int32) As void// You can use this method in JavaScript.
Parameters
pin
int Int32 Int32 Int32

Which pin to stop the PWM signal on.

EnablePin(Int32) EnablePin(Int32) EnablePin(Int32) EnablePin(Int32)

Starts the PWM signal on the specified pin.

public : void EnablePin(int pin)public void EnablePin(Int32 pin)Public Function EnablePin(pin As Int32) As void// You can use this method in JavaScript.
Parameters
pin
int Int32 Int32 Int32

Which pin to start the PWM signal on.

ReleasePin(Int32) ReleasePin(Int32) ReleasePin(Int32) ReleasePin(Int32)

Releases connection to specified pin and makes that pin available to others.

public : void ReleasePin(int pin)public void ReleasePin(Int32 pin)Public Function ReleasePin(pin As Int32) As void// You can use this method in JavaScript.
Parameters
pin
int Int32 Int32 Int32

Which pin to release.

SetDesiredFrequency(Double) SetDesiredFrequency(Double) SetDesiredFrequency(Double) SetDesiredFrequency(Double)

Sets the desired PWM frequency.

public : double SetDesiredFrequency(double frequency)public double SetDesiredFrequency(Double frequency)Public Function SetDesiredFrequency(frequency As Double) As double// You can use this method in JavaScript.
Parameters
frequency
double Double Double Double

The desired frequency in Hz.

Returns
double double double double

The actual PWM frequency after setting to above value. This will be the closest supported match as determined by the provider.

SetPulseParameters(Int32, Double, Boolean) SetPulseParameters(Int32, Double, Boolean) SetPulseParameters(Int32, Double, Boolean) SetPulseParameters(Int32, Double, Boolean)

Sets the PWM parameters for pin, duty cycle, and polarity.

public : void SetPulseParameters(int pin, double dutyCycle, bool invertPolarity)public void SetPulseParameters(Int32 pin, Double dutyCycle, Boolean invertPolarity)Public Function SetPulseParameters(pin As Int32, dutyCycle As Double, invertPolarity As Boolean) As void// You can use this method in JavaScript.
Parameters
pin
int Int32 Int32 Int32

Indicates which pin these values apply to.

dutyCycle
double Double Double Double

The duty cycle percentage, with value between 0 and 100 inclusive.

invertPolarity
bool Boolean Boolean Boolean

True if polarity of pin should be inverted, otherwise false.