Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RGBLed.hpp
00001 #ifndef RGBLED_H 00002 #define RGBLED_H 00003 00004 #include <mbed.h> 00005 00006 class RGBLed 00007 { 00008 public: 00009 enum Color 00010 { 00011 Black = 0, 00012 Red, 00013 Green, 00014 Yellow, 00015 Blue, 00016 Magenta, 00017 Cyan, 00018 White 00019 }; 00020 00021 RGBLed(PinName rPin, PinName gPin, PinName bPin); 00022 00023 bool getRed(); 00024 bool getGreen(); 00025 bool getBlue(); 00026 Color get(); 00027 00028 RGBLed& setRed(bool value); 00029 RGBLed& setGreen(bool value); 00030 RGBLed& setBlue(bool value); 00031 RGBLed& set(bool rValue, bool gValue, bool bValue); 00032 RGBLed& set(Color color); 00033 00034 private: 00035 DigitalOut r, g, b; 00036 }; 00037 00038 #endif // RGBLED_H
Generated on Wed Jul 20 2022 23:15:26 by
1.7.2