
elec350
Fork of elec350 by
led.h@16:721e41936a07, 2015-11-19 (annotated)
- Committer:
- rmerrisonhort
- Date:
- Thu Nov 19 10:06:45 2015 +0000
- Revision:
- 16:721e41936a07
- Parent:
- 15:c1362c12a896
Added InternalTemperature class.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rmerrisonhort | 0:753cf4c2738f | 1 | #ifndef _LED_H_ |
rmerrisonhort | 0:753cf4c2738f | 2 | #define _LED_H_ |
rmerrisonhort | 0:753cf4c2738f | 3 | |
rmerrisonhort | 0:753cf4c2738f | 4 | #include "mbed.h" |
rmerrisonhort | 0:753cf4c2738f | 5 | #include <string> |
rmerrisonhort | 0:753cf4c2738f | 6 | |
rmerrisonhort | 0:753cf4c2738f | 7 | class Led { |
rmerrisonhort | 0:753cf4c2738f | 8 | private: |
rmerrisonhort | 0:753cf4c2738f | 9 | PinName pinName; |
rmerrisonhort | 0:753cf4c2738f | 10 | DigitalOut* pin; |
rmerrisonhort | 15:c1362c12a896 | 11 | bool isOn; |
rmerrisonhort | 0:753cf4c2738f | 12 | public: |
rmerrisonhort | 0:753cf4c2738f | 13 | Led(string name); |
rmerrisonhort | 7:aa63d1e53be6 | 14 | void On(); |
rmerrisonhort | 7:aa63d1e53be6 | 15 | void Off(); |
rmerrisonhort | 15:c1362c12a896 | 16 | bool getIsOn(); |
rmerrisonhort | 0:753cf4c2738f | 17 | }; |
rmerrisonhort | 0:753cf4c2738f | 18 | |
rmerrisonhort | 15:c1362c12a896 | 19 | #endif |
rmerrisonhort | 15:c1362c12a896 | 20 |