From 82c77576339389bf3bdab7391a99a5299e0f70d0 Mon Sep 17 00:00:00 2001 From: Greg White Date: Thu, 4 Jan 2007 11:44:32 +0000 Subject: Add option to toggle LCD popwer off, gigabeat only git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11907 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 9a50970b92..c459b7b8de 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -2049,6 +2049,48 @@ static bool dbg_set_memory_guard(void) } #endif /* CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) */ +#if defined(TOSHIBA_GIGABEAT_F) + +extern volatile bool lcd_poweroff; + +static bool dbg_lcd_power_off(void) +{ + lcd_setmargins(0, 0); + + while(1) + { + int button; + + lcd_clear_display(); + lcd_puts(0, 0, "LCD Power Off"); + if(lcd_poweroff) + lcd_puts(1, 1, "Yes"); + else + lcd_puts(1, 1, "No"); + + lcd_update(); + + button = get_action(CONTEXT_STD,HZ/5); + switch(button) + { + case ACTION_STD_PREV: + case ACTION_STD_NEXT: + lcd_poweroff = !lcd_poweroff; + break; + case ACTION_STD_OK: + case ACTION_STD_CANCEL: + action_signalscreenchange(); + return false; + default: + sleep(HZ/10); + break; + } + } + return false; +} + +#endif + #if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) static bool dbg_write_eeprom(void) { @@ -2097,6 +2139,9 @@ bool debug_menu(void) bool result; static const struct menu_item items[] = { +#if defined(TOSHIBA_GIGABEAT_F) + { "LCD Power Off", dbg_lcd_power_off }, +#endif #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) { "Dump ROM contents", dbg_save_roms }, #endif -- cgit v1.2.3