diff --git a/bootloader/ipod-s5l87xx.c b/bootloader/ipod-s5l87xx.c index beb1415f94..67b84533ee 100644 --- a/bootloader/ipod-s5l87xx.c +++ b/bootloader/ipod-s5l87xx.c @@ -73,6 +73,7 @@ #define LCD_RBYELLOW LCD_RGBPACK(255,192,0) #define LCD_REDORANGE LCD_RGBPACK(255,70,0) +#define LCD_GREEN LCD_RGBPACK(0,255,0) extern void bss_init(void); extern uint32_t _movestart; @@ -347,9 +348,9 @@ extern int lcd_type; static uint16_t alive[] = { 500,100,0, 0 }; static uint16_t alivelcd[] = { 2000,200,0, 0 }; +#ifndef IPOD_6G static void sleep_test(void) { -#ifndef IPOD_6G int sleep_tmo = 5; int awake_tmo = 3; @@ -376,8 +377,8 @@ static void sleep_test(void) printf("Press SELECT to continue"); while (button_status() != BUTTON_SELECT) sleep(HZ/100); -#endif } +#endif static void pmu_info(void) { @@ -482,6 +483,7 @@ static void run_of(void) sleep(HZ*10); } +#if defined(IPOD_6G) || defined(IPOD_NANO3G) static void print_syscfg(void) { lcd_clear_display(); @@ -557,21 +559,53 @@ end: while (button_status() != BUTTON_SELECT) sleep(HZ/100); } +#endif /* IPOD_6G || IPOD_NANO3G */ static void devel_menu(void) { + const char *items[] = { +#ifndef IPOD_6G + "LCD sleep/awake test", +#endif + "PMU info", + "GPIO info", +#if defined(IPOD_6G) || defined(IPOD_NANO3G) + "Show SysCfg", +#endif + "Launch OF", + //"Launch Rockbox", + "Restart", + "Power off", + }; + void (*handlers[])(void) = { +#ifndef IPOD_6G + sleep_test, +#endif + pmu_info, + gpio_info, +#if defined(IPOD_6G) || defined(IPOD_NANO3G) + print_syscfg, +#endif + run_of, + //run_rockbox, + system_reboot, + power_off, + }; + const size_t items_count = sizeof(items) / sizeof(items[0]); + unsigned char selected_item = 0; + while (1) { lcd_clear_display(); lcd_set_foreground(LCD_RBYELLOW); line = 0; - printf("Select action:"); - printf("