Expand description
Monocolor LEDs
Various types of RGB LEDs.
Examples
use led::LED;
use led::monocolor::CommonAnodeLED;
let mut led = CommonAnodeLED::new(p);
led.set(State::On);
use led::LED;
use led::monocolor::{CommonAnodeLED, CommonCathodeLED, Monocolor};
let mut leds: [&mut Monocolor; 2] = [
&mut CommonAnodeLED::new(p1),
&mut CommonCathodeLED::new(p2),
];
for led in leds.iter_mut() {
led.set(State::On)
}
Structs
- A marker type that represents a common anode connection.
- A marker type that represents a common cathode connection.
- An RGB LED
Enums
Traits
- The polarity of the LED; either anode or cathode.
- A monocolor LED; either common anode or common cathode.
Type Definitions
- A common anode LED.
- A common cathode LED.