[−][src]Struct led::rgb::LED
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]
C: Common,
R: OutputPin,
G: OutputPin,
B: OutputPin,
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]
C: Common,
R: OutputPin,
G: OutputPin,
B: OutputPin,
Auto Trait Implementations
impl<C, R, G, B> Send for LED<C, R, G, B> where
B: Send,
C: Send,
G: Send,
R: Send,
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,
B: Sync,
C: Sync,
G: Sync,
R: Sync,
Blanket Implementations
impl<L> RGB for L where
L: LED<Input = Color>,
[src]
L: LED<Input = Color>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,