summaryrefslogtreecommitdiffstats
path: root/bootloader/main-pp.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-11-19 02:07:40 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-11-19 02:07:40 +0000
commitfc8e09d79dfb1d0a9999bf7434e6772eaae91417 (patch)
tree40d4c9c9f9609841d061cf0a796e21f3d7dfe354 /bootloader/main-pp.c
parentf4fcbb37470b08df3df44c6ebf0e5e0e5dadcf02 (diff)
downloadrockbox-fc8e09d79dfb1d0a9999bf7434e6772eaae91417.tar.gz
rockbox-fc8e09d79dfb1d0a9999bf7434e6772eaae91417.tar.bz2
rockbox-fc8e09d79dfb1d0a9999bf7434e6772eaae91417.zip
shutdown if hold is on in the non-ipod-pp target bootloaders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15679 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r--bootloader/main-pp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 3c498d9ee1..c2d0b8038d 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -33,6 +33,7 @@
#include "disk.h"
#include "crc32-mi4.h"
#include <string.h>
+#include "power.h"
#if defined(SANSA_E200)
#include "i2c.h"
#include "backlight-target.h"
@@ -443,11 +444,19 @@ void* main(void)
i2c_init();
_backlight_on();
#endif
-
lcd_set_foreground(LCD_WHITE);
lcd_set_background(LCD_BLACK);
lcd_clear_display();
+ if (button_hold())
+ {
+ verbose = true;
+ printf("Hold switch on");
+ printf("Shutting down...");
+ sleep(HZ);
+ power_off();
+ }
+
btn = button_read_device();
#if defined(SANSA_E200) || defined(SANSA_C200)
usb_init();