Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: main.cpp
- Revision:
- 110:ee9ae4a5e55c
- Parent:
- 107:f1ee3e1eb126
- Child:
- 111:8ab3899c4e3d
--- a/main.cpp Wed May 13 15:00:24 2015 +0000 +++ b/main.cpp Fri May 15 10:13:19 2015 +0000 @@ -87,8 +87,6 @@ pMdm = &mdm; InterruptIn joystickUp(A2); InterruptIn joystickDown(A3); - joystickUp.rise(&enableDebug); - joystickDown.rise(&disableDebug); // CyaSSL_Init(); // pCtx = CyaSSL_CTX_new(CyaTLSv1_2_client_method()); @@ -108,15 +106,18 @@ shutdown(); return 2; } - + joystickUp.rise(&enableDebug); + joystickDown.rise(&disableDebug); + DigitalIn fireButton(D4); if (fireButton) { - if (delCredential()) { + LCDDisplay::inst().setLines("Factory resetting..."); + Thread::wait(2000); // wait for Disk I/O to be ready + if (resetCredential()) { LCDDisplay::inst().setLines("Reset Success"); } else { LCDDisplay::inst().setLines("Reset Failure"); } - Thread::wait(2000); shutdown(); return 0; }