summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-11-03 07:42:42 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-11-03 07:42:42 +0000
commitd06aafc03a594ed7ad8833babf78d31b091c72ee (patch)
tree0d3017d34e010328902a79db8cd62b0469da8433
parent890444c91729d1df1489dee3bb4a35815c168151 (diff)
downloadrockbox-d06aafc03a594ed7ad8833babf78d31b091c72ee.zip
rockbox-d06aafc03a594ed7ad8833babf78d31b091c72ee.tar.gz
rockbox-d06aafc03a594ed7ad8833babf78d31b091c72ee.tar.bz2
rockbox-d06aafc03a594ed7ad8833babf78d31b091c72ee.tar.xz
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
-rw-r--r--firmware/target/arm/as3525/system-as3525.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index c6469f9..6d16c1b 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());
}