[][src]Struct wiringpi::pin::SoftPwmPin

pub struct SoftPwmPin<Pin>(_, _);

A pin with software controlled PWM output.

Due to limitations of the chip only one pin is able to do hardware-controlled PWM output. The SoftPwmPins on the other hand allow for all GPIOs to output PWM signals.

The pulse width of the signal will be 100μs with a value range of [0,100] (where 0 is a constant low and 100 is a constant high) resulting in a frequenzy of 100 Hz.

Important: In order to use software PWM pins wiringPi has to be setup in GPIO mode via setup_gpio().

Methods

impl<P: Pin + RequiresRoot> SoftPwmPin<P>
[src]

Configures the given pin to output a software controlled PWM signal.

Sets the duty cycle.

value has to be in the interval [0,100].

Stops the software handling of this pin.

Note: In order to control this pin via software PWM again it will need to be recreated using new().

impl<P: Pin + Pwm> SoftPwmPin<P>
[src]

impl<P: Pin + GpioClock> SoftPwmPin<P>
[src]

Auto Trait Implementations

impl<Pin> Send for SoftPwmPin<Pin> where
    Pin: Send

impl<Pin> Sync for SoftPwmPin<Pin> where
    Pin: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.