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.
Fork of RGBLED by
rgbled.h
00001 #ifndef __RGBLED_H__ 00002 #define __RGBLED_H__ 00003 00004 // includes 00005 #include "mbed.h" 00006 00007 // defines 00008 enum color {none, red, yellow, green, cyan, blue, magenta}; 00009 00010 // rgb led 00011 class rgbled { 00012 private: 00013 DigitalOut _pin_red; 00014 DigitalOut _pin_green; 00015 DigitalOut _pin_blue; 00016 bool _on; 00017 bool _off; 00018 void _none(void); 00019 void _red(void); 00020 void _yellow(void); 00021 void _green(void); 00022 void _cyan(void); 00023 void _blue(void); 00024 void _magenta(void); 00025 public: 00026 rgbled(PinName pin_red, PinName pin_green, PinName pin_blue); 00027 void active(bool a); 00028 void set(color c); 00029 }; 00030 00031 #endif
Generated on Wed Jul 20 2022 23:24:26 by
1.7.2
