Bob Merrison-Hort
/
elec350
elec350
Fork of elec350 by
button.h@0:753cf4c2738f, 2015-10-13 (annotated)
- Committer:
- rmerrisonhort
- Date:
- Tue Oct 13 01:10:14 2015 +0000
- Revision:
- 0:753cf4c2738f
- Child:
- 3:998b7d011f2a
Created ELEC350 library.
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 | 0:753cf4c2738f | 5 | |
rmerrisonhort | 0:753cf4c2738f | 6 | class Button { |
rmerrisonhort | 0:753cf4c2738f | 7 | private: |
rmerrisonhort | 0:753cf4c2738f | 8 | DigitalIn* pin; |
rmerrisonhort | 0:753cf4c2738f | 9 | public: |
rmerrisonhort | 0:753cf4c2738f | 10 | Button(); |
rmerrisonhort | 0:753cf4c2738f | 11 | bool isPressed(); |
rmerrisonhort | 0:753cf4c2738f | 12 | float waitWhileHeld(); |
rmerrisonhort | 0:753cf4c2738f | 13 | }; |
rmerrisonhort | 0:753cf4c2738f | 14 | |
rmerrisonhort | 0:753cf4c2738f | 15 | #endif |