From d06aafc03a594ed7ad8833babf78d31b091c72ee Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Tue, 3 Nov 2009 07:42:42 +0000 Subject: Sansa AMS: fix system_exception_wait() If a panicf() is called while a button is still pressed, the Sansa would reboot immediately with no chance to see the message git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23490 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/system-as3525.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index c6469f9980..6d16c1bfca 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -327,6 +327,9 @@ void system_reboot(void) void system_exception_wait(void) { + /* wait until button release (if a button is pressed) */ + while(button_read_device()); + /* then wait until next button press */ while(!button_read_device()); } -- cgit v1.2.3