badge/ui/event: Beim Warten pmuSleep().
[hackover2013-badge-firmware.git] / badge / ui / event.c
index 157c8c9..c705a0e 100644 (file)
@@ -1,6 +1,7 @@
 #include "event.h"
 
 #include <core/gpio/gpio.h>
 #include "event.h"
 
 #include <core/gpio/gpio.h>
+#include <core/pmu/pmu.h>
 #include <core/timer32/timer32.h>
 
 #ifdef R0KET
 #include <core/timer32/timer32.h>
 
 #ifdef R0KET
@@ -68,8 +69,9 @@ void badge_event_irq(void) {
 }
 
 badge_event_t badge_event_wait(void) {
 }
 
 badge_event_t badge_event_wait(void) {
-  while(!event_flag)
-    ;
+  while(!event_flag) {
+    pmuSleep();
+  }
 
   // User input takes precedence.
   if(event_flag & BADGE_EVENT_FLAG_INPUT) {
 
   // User input takes precedence.
   if(event_flag & BADGE_EVENT_FLAG_INPUT) {
This page took 0.022512 seconds and 4 git commands to generate.