summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-26 21:31:47 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-26 21:31:47 +0000
commitd1d752554b3976fd6f6956eb1ddcbd415a2260f6 (patch)
treeba56b2e33bf97bf28c3459a08ca5e45151e3daee
parent2dd9b33977606c9441791cb2f56dad5df8d3dd0c (diff)
downloadrockbox-d1d752554b3976fd6f6956eb1ddcbd415a2260f6.tar.gz
rockbox-d1d752554b3976fd6f6956eb1ddcbd415a2260f6.zip
Bug 574204 fixed. Now reboots when OFF is pressed while charging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1207 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/button.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index bd54dba523..7f680c6643 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -23,6 +23,7 @@
23#include <stdlib.h> 23#include <stdlib.h>
24#include "config.h" 24#include "config.h"
25#include "sh7034.h" 25#include "sh7034.h"
26#include "system.h"
26#include "button.h" 27#include "button.h"
27#include "kernel.h" 28#include "kernel.h"
28#include "backlight.h" 29#include "backlight.h"
@@ -64,6 +65,14 @@ static void button_tick(void)
64 post = true; 65 post = true;
65 repeat = true; 66 repeat = true;
66 count = REPEAT_INTERVAL; 67 count = REPEAT_INTERVAL;
68#ifdef HAVE_RECORDER_KEYPAD
69 /* If the OFF button is pressed long enough, and we are
70 still alive, then the unit must be connected to a
71 charger. Therefore we will reboot and let the original
72 firmware handle the charging. */
73 if(btn == BUTTON_OFF)
74 system_reboot();
75#endif
67 } 76 }
68 } 77 }
69 if ( post ) 78 if ( post )