SoftwarePwmChannel Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SoftwarePwmChannel(Int32, Int32, Double, Boolean, GpioController) | |
SoftwarePwmChannel(Int32, Int32, Double, Boolean, GpioController, Boolean) |
Initializes a new instance of the SoftwarePwmChannel class. |
SoftwarePwmChannel(Int32, Int32, Double, Boolean, GpioController)
public SoftwarePwmChannel (int pinNumber, int frequency = 400, double dutyCycle = 0.5, bool usePrecisionTimer = false, System.Device.Gpio.GpioController controller = default);
new System.Device.Pwm.Drivers.SoftwarePwmChannel : int * int * double * bool * System.Device.Gpio.GpioController -> System.Device.Pwm.Drivers.SoftwarePwmChannel
Public Sub New (pinNumber As Integer, Optional frequency As Integer = 400, Optional dutyCycle As Double = 0.5, Optional usePrecisionTimer As Boolean = false, Optional controller As GpioController = Nothing)
Parameters
- pinNumber
- Int32
- frequency
- Int32
- dutyCycle
- Double
- usePrecisionTimer
- Boolean
- controller
- GpioController
Applies to
SoftwarePwmChannel(Int32, Int32, Double, Boolean, GpioController, Boolean)
Initializes a new instance of the SoftwarePwmChannel class.
public SoftwarePwmChannel (int pinNumber, int frequency = 400, double dutyCycle = 0.5, bool usePrecisionTimer = false, System.Device.Gpio.GpioController? controller = default, bool shouldDispose = true);
new System.Device.Pwm.Drivers.SoftwarePwmChannel : int * int * double * bool * System.Device.Gpio.GpioController * bool -> System.Device.Pwm.Drivers.SoftwarePwmChannel
Public Sub New (pinNumber As Integer, Optional frequency As Integer = 400, Optional dutyCycle As Double = 0.5, Optional usePrecisionTimer As Boolean = false, Optional controller As GpioController = Nothing, Optional shouldDispose As Boolean = true)
Parameters
- pinNumber
- Int32
The GPIO pin number to be used
- frequency
- Int32
The frequency in hertz. Defaults to 400
- dutyCycle
- Double
The duty cycle percentage represented as a value between 0.0 and 1.0
- usePrecisionTimer
- Boolean
Determines if a high precision timer should be used.
- controller
- GpioController
The GpioController to which pinNumber
belongs to. null
defaults to board GpioController
- shouldDispose
- Boolean
true
to automatically dispose the controller when this class is disposed, false
otherwise. This parameter is ignored if controller
is null
.