
elec350
Fork of elec350 by
button.h@4:549d1d8ca969, 2015-10-15 (annotated)
- Committer:
- rmerrisonhort
- Date:
- Thu Oct 15 16:34:35 2015 +0000
- Revision:
- 4:549d1d8ca969
- Parent:
- 3:998b7d011f2a
- Child:
- 5:f2c1ff02e333
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rmerrisonhort | 0:753cf4c2738f | 1 | #ifndef _BUTTON_H_ |
rmerrisonhort | 0:753cf4c2738f | 2 | #define _BUTTON_H_ |
rmerrisonhort | 0:753cf4c2738f | 3 | |
rmerrisonhort | 0:753cf4c2738f | 4 | #include "mbed.h" |
rmerrisonhort | 3:998b7d011f2a | 5 | #include <string> |
rmerrisonhort | 3:998b7d011f2a | 6 | |
rmerrisonhort | 0:753cf4c2738f | 7 | class Button { |
rmerrisonhort | 0:753cf4c2738f | 8 | private: |
rmerrisonhort | 0:753cf4c2738f | 9 | DigitalIn* pin; |
rmerrisonhort | 0:753cf4c2738f | 10 | public: |
rmerrisonhort | 3:998b7d011f2a | 11 | Button(string name); |
rmerrisonhort | 0:753cf4c2738f | 12 | bool isPressed(); |
rmerrisonhort | 0:753cf4c2738f | 13 | }; |
rmerrisonhort | 0:753cf4c2738f | 14 | |
rmerrisonhort | 4:549d1d8ca969 | 15 | #endif |
rmerrisonhort | 4:549d1d8ca969 | 16 |