rk27xx: implement system_exception_wait()

Change-Id: If55cfdf7ef91e732ac0aae6ad9fde24b8918e1b8
This commit is contained in:
Marcin Bukat 2012-07-11 00:27:13 +02:00
parent 676f72a0f4
commit 80ec94c497

View file

@ -22,6 +22,7 @@
#include "kernel.h" #include "kernel.h"
#include "system.h" #include "system.h"
#include "panic.h" #include "panic.h"
#include "button.h"
#include "system-target.h" #include "system-target.h"
#define default_interrupt(name) \ #define default_interrupt(name) \
@ -166,7 +167,10 @@ void system_reboot(void)
void system_exception_wait(void) void system_exception_wait(void)
{ {
while(1); /* wait until button release (if a button is pressed) */
while(button_read_device());
/* then wait until next button press */
while(!button_read_device());
} }
int system_memory_guard(int newmode) int system_memory_guard(int newmode)