A simple class for driving an RGB LED that uses standard color specification.

Dependencies:   C12832

Committer:
vandep01
Date:
Fri May 24 03:21:40 2013 +0000
Revision:
0:396b3f9574ea
Initial revision of RgbLED class.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vandep01 0:396b3f9574ea 1
vandep01 0:396b3f9574ea 2 #ifndef RGBCOLOR_H
vandep01 0:396b3f9574ea 3 #define RGBCOLOR_H
vandep01 0:396b3f9574ea 4
vandep01 0:396b3f9574ea 5 /** \brief Struct definition for a color made of up of RGB.
vandep01 0:396b3f9574ea 6 */
vandep01 0:396b3f9574ea 7 struct RGBColor
vandep01 0:396b3f9574ea 8 {
vandep01 0:396b3f9574ea 9 RGBColor() : red(0), green(0), blue(0)
vandep01 0:396b3f9574ea 10 {
vandep01 0:396b3f9574ea 11 }
vandep01 0:396b3f9574ea 12
vandep01 0:396b3f9574ea 13 RGBColor(const float _red, const float _green, const float _blue) : red(_red), green(_green), blue(_blue)
vandep01 0:396b3f9574ea 14 {
vandep01 0:396b3f9574ea 15 }
vandep01 0:396b3f9574ea 16
vandep01 0:396b3f9574ea 17 float red;
vandep01 0:396b3f9574ea 18 float green;
vandep01 0:396b3f9574ea 19 float blue;
vandep01 0:396b3f9574ea 20 };
vandep01 0:396b3f9574ea 21
vandep01 0:396b3f9574ea 22 #endif // RGBCOLOR_H