Pawel Poplawski
/
mbed-os-example-blinky-deep-sleep-test
Deep sleep tests
Revision 99:688a02d088d4, committed 2019-09-19
- Comitter:
- freelex
- Date:
- Thu Sep 19 09:01:05 2019 +0000
- Parent:
- 98:f2d7e14c84a1
- Commit message:
- deep_sleep_test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r f2d7e14c84a1 -r 688a02d088d4 main.cpp --- a/main.cpp Wed Sep 04 12:00:04 2019 +0100 +++ b/main.cpp Thu Sep 19 09:01:05 2019 +0000 @@ -27,6 +27,15 @@ // Following the main thread wait, report on the current system status sys_state.report_state(); count = 0; + + mbed_stats_cpu_t stats; + mbed_stats_cpu_get(&stats); + printf("Uptime: %llu ", stats.uptime / 1000); + printf("Sleep time: %llu ", stats.sleep_time / 1000); + printf("Deep Sleep: %llu\n", stats.deep_sleep_time / 1000); + + wait(1.0); + } ++count; }
diff -r f2d7e14c84a1 -r 688a02d088d4 mbed-os.lib --- a/mbed-os.lib Wed Sep 04 12:00:04 2019 +0100 +++ b/mbed-os.lib Thu Sep 19 09:01:05 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#5941d1718339116cd12914238ec331c84da3d08f +https://github.com/ARMmbed/mbed-os/#1bf6b20df9d3cd5f29f001ffc6f0d0fcbbb96118