Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: PowerControl.cpp
- Revision:
- 0:f7568c04c1c3
- Child:
- 1:1bae9ab7241e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PowerControl.cpp Wed May 10 17:13:50 2017 +0000
@@ -0,0 +1,17 @@
+#include "PowerControl.h"
+
+PowerControl::PowerControl(PinName greenButton, PinName redButton):
+ _greenButton(greenButton), _redButton(redButton)
+{
+// _greenButton.mode(PullUp);
+ _greenButton.fall(this, &PowerControl::goSleep);
+// _redButton.mode(PullUp);
+ //_red.fall(this, &MotorRPM::addSample);
+}
+
+void PowerControl::goSleep(void)
+{
+ printf("going to sleep\r\n");
+
+ //sleep();
+}
\ No newline at end of file