[][src]Struct led::rgb::LED

pub struct LED<C, R, G, B> { /* fields omitted */ }

An RGB LED

The RGB LED is represented by three owned instances of embedded_hal::digital::OutputPin and a polarity (common anode or common cathode). Because the outputs are binary, only eight colors can be presented: primary colors, secondary colors, white, and black.

Methods

impl<C, R, G, B> LED<C, R, G, B> where
    C: Common,
    R: OutputPin,
    G: OutputPin,
    B: OutputPin
[src]

pub fn new(red: R, green: G, blue: B) -> LED<C, R, G, B>[src]

Creates a new RGB LED given three GPIOs.

Trait Implementations

impl<C, R, G, B> LED for LED<C, R, G, B> where
    C: Common,
    R: OutputPin,
    G: OutputPin,
    B: OutputPin
[src]

type Input = Color

fn set(&mut self, color: Color)[src]

Sets the RGB LED to the specified color.

Auto Trait Implementations

impl<C, R, G, B> Send for LED<C, R, G, B> where
    B: Send,
    C: Send,
    G: Send,
    R: Send

impl<C, R, G, B> Sync for LED<C, R, G, B> where
    B: Sync,
    C: Sync,
    G: Sync,
    R: Sync

Blanket Implementations

impl<L> RGB for L where
    L: LED<Input = Color>, 
[src]

impl<T> From for T[src]

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

type Error = !

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

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

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

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

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

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