[−][src]Module led::rgb
RGB LEDs
Various types of RGB LEDs.
Examples
use led::LED; use led::rgb::{Color, CommonAnodeLED}; let mut led = CommonAnodeLED::new(r, g, b); led.set(Color::Green);
use led::LED; 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) }
Structs
CommonAnode | A marker type that represents a common anode connection. |
CommonCathode | A marker type that represents a common cathode connection. |
LED | An RGB LED |
Enums
Color | The set of primary colors and secondary colors that can be created by an RGB LED along with black and white. |
Traits
Common | The polarity of the LED; either anode or cathode. |
RGB | An RGB LED; either common anode or common cathode. |
Type Definitions
CommonAnodeLED | A common anode LED. |
CommonCathodeLED | A common cathode LED. |