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.
Dependencies: mbed TextLCD keypad
Leds.h
00001 #ifndef LEDS_H 00002 #define LEDS_H 00003 00004 #include "mbed.h" 00005 00006 struct LedPins{ 00007 PinName left; 00008 PinName right; 00009 }; 00010 00011 00012 00013 class Leds{ 00014 00015 public: 00016 enum LedName {LEFT = 0, RIGHT = 1, ALL = 2}; 00017 Leds(PinName leftPin, PinName rightPin); 00018 void on(Leds::LedName ledname); 00019 void off(Leds::LedName ledname); 00020 00021 private: 00022 DigitalOut leftLed; 00023 DigitalOut rightLed; 00024 }; 00025 #endif
Generated on Tue Jul 12 2022 21:04:09 by
1.7.2