PWM Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents a PWM port.
Inheritance Hierarchy
System. . :: . .Object
Microsoft.SPOT.Hardware..::..PWM
Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware.PWM (in Microsoft.SPOT.Hardware.PWM.dll)
Syntax
'Declaration
Public Class PWM _
Implements IDisposable
public class PWM : IDisposable
public ref class PWM : IDisposable
type PWM =
class
interface IDisposable
end
public class PWM implements IDisposable
The PWM type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
PWM(Cpu. . :: . .PWMChannel, Double, Double, Boolean) | Initializes a new instance of the PWM class with the specified channel, frequency, duty cycle, and value that indicates whether the output is inverted. |
![]() |
PWM(Cpu. . :: . .PWMChannel, UInt32, UInt32, PWM. . :: . .ScaleFactor, Boolean) | Initializes a new instance of the PWM class with the specified channel, period, duration, scale and value that indicates whether the output is inverted. |
Top
Properties
Name | Description | |
---|---|---|
![]() |
Duration | Gets or sets the duration of the pulse. Value should be a fraction of the period. |
![]() |
DutyCycle | Gets or sets the duty cycle of the pulse as a fraction of unity. |
![]() |
Frequency | Gets or sets the frequency of the pulse. |
![]() |
Period | Gets or sets the period of the pulse. |
![]() |
Pin | Gets the GPIO pin for the channel. |
![]() |
Scale | Gets or sets the scale factor for the duration and period. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Commit | Moves values to the HAL. |
![]() |
Dispose() () () () | Releases resources, including stopping the port if still running and releasing the underlying pin. |
![]() |
Dispose(Boolean) | Releases resources, including stopping the port if still running and releasing the underlying pin, and optionally releases unmanaged resources. |
![]() |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() |
Finalize | Stops the port, if running, and releases the resources before being reclaimed by the garbage collector. (Overrides Object. . :: . .Finalize() () () ().) |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
Init | Initializes the controller. |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
Start() () () () | Starts the PWM port for an indefinite amount of time. |
![]() ![]() |
Start(array<PWM> [] () [] []) | Starts a number of PWM ports at the same time. |
![]() |
Stop() () () () | Stops the PWM port. |
![]() ![]() |
Stop(array<PWM> [] () [] []) | Stops a number of PWM ports at the same time. |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() |
Uninit | Uninitializes the controller. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.