Struct nrf_smartled::pwm::Pwm[][src]

pub struct Pwm<T: Instance> { /* fields omitted */ }
Expand description

A PWM peripheral driven Smartled driver

Implementations

Create a new Smartled driver with a given pin and PWM engine

Start sending raw data

NOTE: You should probably use Pwm::send_full_buf() instead.

SAFETY: the contents of buf must live and be constant until Pwm::is_done_raw() returns true.

Set the seq[1] register’s ptr and length

SAFETY: the contents of buf must live and me constant until sequence 1 is completed

Is the raw send complete?

Note: You probably shouldn’t use this function unless you are also using Pwm::start_send_raw().

Send a series of colors and a stop pattern, using a given scratch space

NOTE: the size of scratch must be >= u16s_needed_slice(colors).

NOTE: You can also use the SmartLedsWrite::write method to avoid the need for a scratch space (it uses its own)

Trait Implementations

Write all the items of an iterator to a ws2812 strip

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Casts the value.

OverflowingCasts the value.

Should always be Self

Casts the value.

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

UnwrappedCasts the value.

Casts the value.

WrappingCasts the value.