Trait led::mono::Monocolor

source ·
pub trait Monocolor: LED<Input = State> { }
Expand description

A monocolor LED; either common anode or common cathode.

Examples

use led::rgb::{Color, CommonAnodeLED, CommonCathodeLED, RGB};

let mut leds: [&mut RGB; 2] = [
    &mut CommonAnodeLED::new(r1, g1, b1),
    &mut CommonCathodeLED::new(r2, g2, b2),
];

for led in leds.iter_mut() {
    led.set(Color::Red)
}

Implementors§

source§

impl<L> Monocolor for Lwhere L: LED<Input = State>,