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
This commit is contained in:
parent
f4fcbb3747
commit
fc8e09d79d
1 changed files with 10 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue