#include "event.h"
#include <core/gpio/gpio.h>
+#include <core/pmu/pmu.h>
#include <core/timer32/timer32.h>
#ifdef R0KET
}
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) {
timer32SetIntHandler(badge_event_irq);
timer32Enable(0);
}
+
+void badge_event_stop (void) {
+ timer32Disable(0);
+}