1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Mustapha Senhaji 2009-04-10 22:18:02 +00:00
parent e6cbad6974
commit aeddacbd14

View file

@ -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)
{