Two simple classes for using the RGB led
Dependents: 4180-lab3-RTOS 4180-FinalProject
Diff: SimpleRGB.h
- Revision:
- 1:0008e30a2bda
- Parent:
- 0:7a3ee33c0a53
diff -r 7a3ee33c0a53 -r 0008e30a2bda SimpleRGB.h --- a/SimpleRGB.h Mon Oct 10 00:32:31 2016 +0000 +++ b/SimpleRGB.h Mon Oct 10 01:56:26 2016 +0000 @@ -18,6 +18,10 @@ RGBLed(PinName rpin, PinName gpin, PinName bpin); void write(float red, float green, float blue); void write(LightColor color); + RGBLed operator = (LightColor color) { + write(color); + return *this; + }; private: PwmOut _rpin;