C# Class Porrey.Uwp.IoT.SoftPwmExtensions

Fluent API Extension for SoftPwm.
Afficher le fichier Open project: porrey/iot

Méthodes publiques

Méthode Description
AssignSoftPwm ( this pin ) : ISoftPwm

Creates an instance of a SoftPwm object from the given Windows.Devices.Gpio.GpioPin instance.

Start ( this pwm ) : ISoftPwm

Starts the given SoftPwm instance.

WatchPulse ( this pwm, EventHandler eventHandler ) : ISoftPwm

Attaches a handler to the PwmPulsed event to watch for changes in the pulse.

WatchPulseWidthChanges ( this pwm, PulseWidthChangedEventHandler eventHandler ) : ISoftPwm

Attaches a handler to the PulseWidthChanged event to watch for changes to the HighPulseWidth and LowPulseWidth properties.

WithPulseFrequency ( this pwm, double pulseFrequency ) : ISoftPwm

Sets the pulse frequency (in Hz) of the SoftPwm instance.

WithValue ( this pwm, double value ) : ISoftPwm

Sets the value of a SoftPwm instance with the given value.

Method Details

AssignSoftPwm() public static méthode

Creates an instance of a SoftPwm object from the given Windows.Devices.Gpio.GpioPin instance.
public static AssignSoftPwm ( this pin ) : ISoftPwm
pin this An instance of Windows.Devices.Gpio.GpioPin to /// create the SoftPwm on.
Résultat ISoftPwm

Start() public static méthode

Starts the given SoftPwm instance.
public static Start ( this pwm ) : ISoftPwm
pwm this The instance of SoftPwm to start.
Résultat ISoftPwm

WatchPulse() public static méthode

Attaches a handler to the PwmPulsed event to watch for changes in the pulse.
public static WatchPulse ( this pwm, EventHandler eventHandler ) : ISoftPwm
pwm this The instance of SoftPwm to start.
eventHandler EventHandler A EventHandler method or lambda expression.
Résultat ISoftPwm

WatchPulseWidthChanges() public static méthode

Attaches a handler to the PulseWidthChanged event to watch for changes to the HighPulseWidth and LowPulseWidth properties.
public static WatchPulseWidthChanges ( this pwm, PulseWidthChangedEventHandler eventHandler ) : ISoftPwm
pwm this The instance of SoftPwm to start.
eventHandler PulseWidthChangedEventHandler A PulseWidthChangedEventHandler method or lambda expression..
Résultat ISoftPwm

WithPulseFrequency() public static méthode

Sets the pulse frequency (in Hz) of the SoftPwm instance.
public static WithPulseFrequency ( this pwm, double pulseFrequency ) : ISoftPwm
pwm this The instance of SoftPwm to start.
pulseFrequency double The pulse frequency to use given in Hz.
Résultat ISoftPwm

WithValue() public static méthode

Sets the value of a SoftPwm instance with the given value.
public static WithValue ( this pwm, double value ) : ISoftPwm
pwm this The instance of SoftPwm to start.
value double The value to set the SoftPwm instance to.
Résultat ISoftPwm