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)
downloadrockbox-aeddacbd14ec3acd839dc9bd0bab34883dd6e6c0.tar.gz
rockbox-aeddacbd14ec3acd839dc9bd0bab34883dd6e6c0.zip
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 @@
33#include "storage.h" 33#include "storage.h"
34#include "disk.h" 34#include "disk.h"
35#include "panic.h" 35#include "panic.h"
36#include "power.h"
36 37
37int show_logo(void); 38int show_logo(void);
38void main(void) 39void main(void)
@@ -57,6 +58,18 @@ void main(void)
57 button_init_device(); 58 button_init_device();
58 int btn = button_read_device(); 59 int btn = button_read_device();
59 60
61#if !defined(SANSA_FUZE) && !defined(SANSA_CLIP)
62 if (button_hold())
63 {
64 verbose = true;
65 lcd_clear_display();
66 printf("Hold switch on");
67 printf("Shutting down...");
68 sleep(HZ);
69 power_off();
70 }
71#endif
72
60 /* Enable bootloader messages if any button is pressed */ 73 /* Enable bootloader messages if any button is pressed */
61 if (btn) 74 if (btn)
62 { 75 {