Basic alarm using low power interrupts
Revision 4:503239af19b8, committed 2018-10-18
- Comitter:
- kgilbert
- Date:
- Thu Oct 18 22:10:00 2018 +0000
- Parent:
- 3:0f0f89079c95
- Commit message:
- Add better sleep in main thread
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 04 22:47:50 2018 +0000
+++ b/main.cpp Thu Oct 18 22:10:00 2018 +0000
@@ -99,5 +99,6 @@
// Attach the low power ticker with the configured alarm delay
alarm_event.attach(&trigger_alarm_out, delay);
- // Fall out of the main loop to go into sleep mode
+ // Sleep in the main thread
+ while (1) { wait(100000); }
}
\ No newline at end of file