C# Class 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.
Inheritance: ISoftPwm
Afficher le fichier Open project: porrey/iot

Méthodes publiques

Свойство Type Description
PwmPulsed EventHandler

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
OnPulseWidthChanged ( double highPulseWidth, double lowPulseWidth ) : void

Called to raise the PulseWidthChanged event.

OnPwmPulsed ( ) : void

Called to raise the PwmPulsed event

Private Methods

Méthode Description
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.

Method Details

Dispose() public méthode

Stops the SoftPwm if active and calls Dispose on the GPIO pin.
public Dispose ( ) : void
Résultat void

OnPulseWidthChanged() protected méthode

Called to raise the PulseWidthChanged event.
protected OnPulseWidthChanged ( double highPulseWidth, double lowPulseWidth ) : void
highPulseWidth double
lowPulseWidth double
Résultat void

OnPwmPulsed() protected méthode

Called to raise the PwmPulsed event
protected OnPwmPulsed ( ) : void
Résultat void

SoftPwm() public méthode

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.
Résultat System

StartAsync() public méthode

Start the SoftPwm in the GPIO pin.
public StartAsync ( ) : void
Résultat void

StopAsync() public méthode

Stop the SoftPwm on the GPIO pin.
public StopAsync ( ) : Task
Résultat Task

Property Details

PwmPulsed public_oe property

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
Résultat EventHandler