
elec350
Fork of elec350 by
led.h@0:753cf4c2738f, 2015-10-13 (annotated)
- Committer:
- rmerrisonhort
- Date:
- Tue Oct 13 01:10:14 2015 +0000
- Revision:
- 0:753cf4c2738f
- Child:
- 7:aa63d1e53be6
Created ELEC350 library.
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 | 0:753cf4c2738f | 11 | public: |
rmerrisonhort | 0:753cf4c2738f | 12 | Led(string name); |
rmerrisonhort | 0:753cf4c2738f | 13 | void SwitchOn(); |
rmerrisonhort | 0:753cf4c2738f | 14 | void SwitchOff(); |
rmerrisonhort | 0:753cf4c2738f | 15 | }; |
rmerrisonhort | 0:753cf4c2738f | 16 | |
rmerrisonhort | 0:753cf4c2738f | 17 | #endif |