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.
Dependencies: BLE_API mbed-dev nRF51822
Diff: main.cpp
- Revision:
- 59:2d6c0bff2151
- Parent:
- 58:64df960619ce
- Child:
- 60:b899414e1d34
--- a/main.cpp Tue Aug 30 14:44:24 2016 +0000
+++ b/main.cpp Wed Aug 31 12:31:14 2016 +0000
@@ -90,7 +90,7 @@
const uint32_t reason = NRF_POWER->RESETREAS;
NRF_POWER->RESETREAS = 0xffffffff; // clear reason
// reset cause should be shown everytime
- serial.printf("init [%x]\r\n", reason);
+ serial.printf("init [%x] sp:%x %x\r\n", reason, GET_SP(), *((uint32_t*)0));
}
{
@@ -258,10 +258,11 @@
const uint8_t batteryPercentage = BatteryLevel::readBatteryPercentage(batteryVoltage);
const bool isLowBattery = batteryVoltage < BatteryLevel::BATTERY_LOW;
- DEBUG_PRINTF("%d%% [%d:%s] %s\r\n",
+ DEBUG_PRINTF("%d%% [%d:%s] %x %s\r\n",
batteryPercentage,
HIDController::status(),
HIDController::statusString(),
+ GET_SP(),
isLowBattery ? "LOWBAT" : "WFE"
);