PwmController PwmController PwmController PwmController Class

Definition

Represents a PWM controller connected to the system.

public : sealed class PwmController : IPwmControllerpublic sealed class PwmController : IPwmControllerPublic NotInheritable Class PwmController Implements IPwmController// You can use this class 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 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.

Methods

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Initializes a PWM controller instance based on the given DeviceInformation ID.

public : static IAsyncOperation<PwmController> FromIdAsync(PlatForm::String deviceId)public static IAsyncOperation<PwmController> FromIdAsync(String deviceId)Public Static Function FromIdAsync(deviceId As String) As IAsyncOperation( Of PwmController )// You can use this method in JavaScript.
Parameters
deviceId
PlatForm::String String String String

The acquired DeviceInformation ID.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v3)

GetControllersAsync(IPwmProvider) GetControllersAsync(IPwmProvider) GetControllersAsync(IPwmProvider) GetControllersAsync(IPwmProvider)

Gets all the controllers on the system asynchronously.

public : static IAsyncOperation<IVectorView<PwmController>> GetControllersAsync(IPwmProvider provider)public static IAsyncOperation<IReadOnlyList<PwmController>> GetControllersAsync(IPwmProvider provider)Public Static Function GetControllersAsync(provider As IPwmProvider) As IAsyncOperation( Of IReadOnlyListPwmController )// You can use this method in JavaScript.
Parameters
provider
IPwmProvider IPwmProvider IPwmProvider IPwmProvider

The PWM provider that is on the system.

Returns
IAsyncOperation<IVectorView<PwmController>> IAsyncOperation<IReadOnlyList<PwmController>> IAsyncOperation<IReadOnlyList<PwmController>> IAsyncOperation<IReadOnlyList<PwmController>>

When the method completes successfully, it returns a list of values that represent the controllers available on the system.

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Gets the default PWM controller on the system.

public : static IAsyncOperation<PwmController> GetDefaultAsync()public static IAsyncOperation<PwmController> GetDefaultAsync()Public Static Function GetDefaultAsync() As IAsyncOperation( Of PwmController )// You can use this method in JavaScript.
Returns

The default PWM controller on the system, or null if the system has no PWM controller.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10586.0) Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v2)

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Retrieves an Advanced Query Syntax (AQS) string for all the PWM controllers on the system. You can use this string with the DeviceInformation.FindAllAsync method to get DeviceInformation objects for those controllers.

public : static PlatForm::String GetDeviceSelector()public static string GetDeviceSelector()Public Static Function GetDeviceSelector() As string// You can use this method in JavaScript.
Returns
PlatForm::String string string string
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v3)

GetDeviceSelector(String) GetDeviceSelector(String) GetDeviceSelector(String) GetDeviceSelector(String)

Retrieves an Advanced Query Syntax (AQS) string for the PWM controller that has the specified friendly name. You can use this string with the DeviceInformation.FindAllAsync method to get DeviceInformation objects for those controllers.

public : static PlatForm::String GetDeviceSelector(PlatForm::String friendlyName)public static string GetDeviceSelector(String friendlyName)Public Static Function GetDeviceSelector(friendlyName As String) As string// You can use this method in JavaScript.
Parameters
friendlyName
PlatForm::String String String String

A friendly name for the particular PWM controller for which you want to get the corresponding AQS string.

Returns
PlatForm::String string string string
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v3)

OpenPin(Int32) OpenPin(Int32) OpenPin(Int32) OpenPin(Int32)

Opens the pin for use.

public : PwmPin OpenPin(int pinNumber)public PwmPin OpenPin(Int32 pinNumber)Public Function OpenPin(pinNumber As Int32) As PwmPin// You can use this method in JavaScript.
Parameters
pinNumber
int Int32 Int32 Int32

Which pin to open.

Returns

The requested pin now available for use.

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

Sets the PWM frequency.

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

Then value of the desired frequency in Hz.

Returns
double double double double

The actual frequency that was set. This will be the closest supported match as determined by the provider.