X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/f4ce05f33d3d5dcfbdd33a74a14c2ac23e379526..e943514377152f441aac2b6540df34244f6de79b:/badge/ui/event.c diff --git a/badge/ui/event.c b/badge/ui/event.c index 157c8c9..c705a0e 100644 --- a/badge/ui/event.c +++ b/badge/ui/event.c @@ -1,6 +1,7 @@ #include "event.h" #include +#include #include #ifdef R0KET @@ -68,8 +69,9 @@ void badge_event_irq(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) {