Board.CreatePwmChannel 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
CreatePwmChannel(Int32, Int32, Int32, Double) |
建立預設針腳指派的 PWM 通道 |
CreatePwmChannel(Int32, Int32, Int32, Double, Int32, PinNumberingScheme) |
建立 PWM 通道 |
CreatePwmChannel(Int32, Int32, Int32, Double)
建立預設針腳指派的 PWM 通道
public System.Device.Pwm.PwmChannel CreatePwmChannel (int chip, int channel, int frequency = 400, double dutyCyclePercentage = 0.5);
member this.CreatePwmChannel : int * int * int * double -> System.Device.Pwm.PwmChannel
Public Function CreatePwmChannel (chip As Integer, channel As Integer, Optional frequency As Integer = 400, Optional dutyCyclePercentage As Double = 0.5) As PwmChannel
參數
- chip
- Int32
晶片編號。 通常為 0
- channel
- Int32
指定晶片上的通道
- frequency
- Int32
初始頻率
- dutyCyclePercentage
- Double
初始工作週期
傳回
pwm 通道實例
適用於
CreatePwmChannel(Int32, Int32, Int32, Double, Int32, PinNumberingScheme)
建立 PWM 通道
public System.Device.Pwm.PwmChannel CreatePwmChannel (int chip, int channel, int frequency, double dutyCyclePercentage, int pin, System.Device.Gpio.PinNumberingScheme pinNumberingScheme);
member this.CreatePwmChannel : int * int * int * double * int * System.Device.Gpio.PinNumberingScheme -> System.Device.Pwm.PwmChannel
Public Function CreatePwmChannel (chip As Integer, channel As Integer, frequency As Integer, dutyCyclePercentage As Double, pin As Integer, pinNumberingScheme As PinNumberingScheme) As PwmChannel
參數
- chip
- Int32
晶片編號。 通常為 0
- channel
- Int32
指定晶片上的通道
- frequency
- Int32
初始頻率
- dutyCyclePercentage
- Double
初始工作週期
- pin
- Int32
pwm 通道的針腳編號。 如果不是硬式 (,也就是在 Raspi 上,可以針對相同的 PWM 通道使用不同的針腳)
- pinNumberingScheme
- PinNumberingScheme
針腳的針腳編號配置
傳回
pwm 通道實例