summaryrefslogtreecommitdiff
path: root/bootloader/sansa_as3525.c
diff options
context:
space:
mode:
authorMustapha Senhaji <moos@rockbox.org>2009-04-10 22:18:02 +0000
committerMustapha Senhaji <moos@rockbox.org>2009-04-10 22:18:02 +0000
commitaeddacbd14ec3acd839dc9bd0bab34883dd6e6c0 (patch)
treebef8b191860a234bea53ae7dac47725a01c84ca1 /bootloader/sansa_as3525.c
parente6cbad69745455d0ad23004c609a909a2cdabcf4 (diff)
FS#10066 by Michael Chicoine: Sansa AMS bootloader "Hold" switch detection.
(Not for the Fuze nor the Clip, because it seems pointless for them) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20681 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/sansa_as3525.c')
-rw-r--r--bootloader/sansa_as3525.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index 02f040aaa3..4705e2b915 100644
--- a/bootloader/sansa_as3525.c
+++ b/bootloader/sansa_as3525.c
@@ -33,6 +33,7 @@
#include "storage.h"
#include "disk.h"
#include "panic.h"
+#include "power.h"
int show_logo(void);
void main(void)
@@ -57,6 +58,18 @@ void main(void)
button_init_device();
int btn = button_read_device();
+#if !defined(SANSA_FUZE) && !defined(SANSA_CLIP)
+ if (button_hold())
+ {
+ verbose = true;
+ lcd_clear_display();
+ printf("Hold switch on");
+ printf("Shutting down...");
+ sleep(HZ);
+ power_off();
+ }
+#endif
+
/* Enable bootloader messages if any button is pressed */
if (btn)
{