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.
Revision 3:54792b95c570, committed 2017-05-21
- Comitter:
- kwasymodo
- Date:
- Sun May 21 22:00:02 2017 +0000
- Parent:
- 2:1e3291e8294d
- Commit message:
- changed stuff;
Changed in this revision
PowerControl.cpp | Show annotated file Show diff for this revision Revisions of this file |
PowerControl.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/PowerControl.cpp Fri May 12 20:19:17 2017 +0000 +++ b/PowerControl.cpp Sun May 21 22:00:02 2017 +0000 @@ -2,7 +2,6 @@ extern RawSerial pc; //extern DigitalOut ledError; -extern CAN can; PowerControl::PowerControl(PinName button): _button(button), _canControl(BUCK2) @@ -12,6 +11,8 @@ _button.setSamplesTillHeld( 200 ); _button.attach_asserted_held( this, &PowerControl::goSleep ); _button.attach_asserted( this, &PowerControl::goWakeup ); + + goWakeup(); } void PowerControl::goSleep(){
--- a/PowerControl.h Fri May 12 20:19:17 2017 +0000 +++ b/PowerControl.h Sun May 21 22:00:02 2017 +0000 @@ -1,6 +1,9 @@ #ifndef POWERCONTROL_H #define POWERCONTROL_H +// uncomment to send debug information +#define DEBUG + #include "mbed.h" // include 3rd party library #include "PinDetect.h"