C# Класс Porrey.Uwp.IoT.SoftPwm

Provides a software based Pulse Width Modulation capability for any GPIO pin on the device. PWM is used in a variety of circuits as a way to control analog circuits through digital interfaces.
Наследование: ISoftPwm
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
PwmPulsed EventHandler

Открытые методы

Метод Описание
Dispose ( ) : void

Stops the SoftPwm if active and calls Dispose on the GPIO pin.

SoftPwm ( Windows.Devices.Gpio.GpioPin pin ) : System

Creates an instance of SoftPwm given an instance of Windows.Devices.Gpio.GpioPin.

StartAsync ( ) : void

Start the SoftPwm in the GPIO pin.

StopAsync ( ) : Task

Stop the SoftPwm on the GPIO pin.

Защищенные методы

Метод Описание
OnPulseWidthChanged ( double highPulseWidth, double lowPulseWidth ) : void

Called to raise the PulseWidthChanged event.

OnPwmPulsed ( ) : void

Called to raise the PwmPulsed event

Приватные методы

Метод Описание
CheckDisposed ( ) : void

Checks if this instance has been disposed and throws the ObjectDisposedException exception if it is.

DelayMicroSeconds ( double delayMicroseconds ) : Task

Delays the current thread by the given number of μs.

Описание методов

Dispose() публичный Метод

Stops the SoftPwm if active and calls Dispose on the GPIO pin.
public Dispose ( ) : void
Результат void

OnPulseWidthChanged() защищенный Метод

Called to raise the PulseWidthChanged event.
protected OnPulseWidthChanged ( double highPulseWidth, double lowPulseWidth ) : void
highPulseWidth double
lowPulseWidth double
Результат void

OnPwmPulsed() защищенный Метод

Called to raise the PwmPulsed event
protected OnPwmPulsed ( ) : void
Результат void

SoftPwm() публичный Метод

Creates an instance of SoftPwm given an instance of Windows.Devices.Gpio.GpioPin.
public SoftPwm ( Windows.Devices.Gpio.GpioPin pin ) : System
pin Windows.Devices.Gpio.GpioPin An instance of Windows.Devices.Gpio.GpioPin to create the SoftPwm on.
Результат System

StartAsync() публичный Метод

Start the SoftPwm in the GPIO pin.
public StartAsync ( ) : void
Результат void

StopAsync() публичный Метод

Stop the SoftPwm on the GPIO pin.
public StopAsync ( ) : Task
Результат Task

Описание свойств

PwmPulsed публичное свойство

This event is fired for every pulse (after the low pulse). Monitoring of this event can impact the performance of this Soft PWM and it's ability to keep accurate timing.
public EventHandler PwmPulsed
Результат EventHandler