elec350

Dependencies:   mbed

Fork of elec350 by Bob Merrison-Hort

Committer:
rmerrisonhort
Date:
Wed Oct 14 21:09:51 2015 +0000
Revision:
3:998b7d011f2a
Parent:
0:753cf4c2738f
Child:
4:549d1d8ca969
Updated button class to take button name in ctor.

Who changed what in which revision?

UserRevisionLine numberNew 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 3:998b7d011f2a 6 #include <string>
rmerrisonhort 3:998b7d011f2a 7
rmerrisonhort 0:753cf4c2738f 8 class Button {
rmerrisonhort 0:753cf4c2738f 9 private:
rmerrisonhort 0:753cf4c2738f 10 DigitalIn* pin;
rmerrisonhort 0:753cf4c2738f 11 public:
rmerrisonhort 3:998b7d011f2a 12 Button(string name);
rmerrisonhort 0:753cf4c2738f 13 bool isPressed();
rmerrisonhort 0:753cf4c2738f 14 float waitWhileHeld();
rmerrisonhort 0:753cf4c2738f 15 };
rmerrisonhort 0:753cf4c2738f 16
rmerrisonhort 0:753cf4c2738f 17 #endif