diff options
author | Greg White <gwhite@rockbox.org> | 2007-01-04 11:44:32 +0000 |
---|---|---|
committer | Greg White <gwhite@rockbox.org> | 2007-01-04 11:44:32 +0000 |
commit | 82c77576339389bf3bdab7391a99a5299e0f70d0 (patch) | |
tree | da411ecd9cf7b9f30c91e203ec0f22e1d719dd15 | |
parent | 9d0faed29ce2293ce35ed8ba0dcba779b50f50a8 (diff) | |
download | rockbox-82c77576339389bf3bdab7391a99a5299e0f70d0.tar.gz rockbox-82c77576339389bf3bdab7391a99a5299e0f70d0.zip |
Add option to toggle LCD popwer off, gigabeat only
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11907 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/debug_menu.c | 45 |
1 files changed, 45 insertions, 0 deletions
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) | |||
2049 | } | 2049 | } |
2050 | #endif /* CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) */ | 2050 | #endif /* CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) */ |
2051 | 2051 | ||
2052 | #if defined(TOSHIBA_GIGABEAT_F) | ||
2053 | |||
2054 | extern volatile bool lcd_poweroff; | ||
2055 | |||
2056 | static bool dbg_lcd_power_off(void) | ||
2057 | { | ||
2058 | lcd_setmargins(0, 0); | ||
2059 | |||
2060 | while(1) | ||
2061 | { | ||
2062 | int button; | ||
2063 | |||
2064 | lcd_clear_display(); | ||
2065 | lcd_puts(0, 0, "LCD Power Off"); | ||
2066 | if(lcd_poweroff) | ||
2067 | lcd_puts(1, 1, "Yes"); | ||
2068 | else | ||
2069 | lcd_puts(1, 1, "No"); | ||
2070 | |||
2071 | lcd_update(); | ||
2072 | |||
2073 | button = get_action(CONTEXT_STD,HZ/5); | ||
2074 | switch(button) | ||
2075 | { | ||
2076 | case ACTION_STD_PREV: | ||
2077 | case ACTION_STD_NEXT: | ||
2078 | lcd_poweroff = !lcd_poweroff; | ||
2079 | break; | ||
2080 | case ACTION_STD_OK: | ||
2081 | case ACTION_STD_CANCEL: | ||
2082 | action_signalscreenchange(); | ||
2083 | return false; | ||
2084 | default: | ||
2085 | sleep(HZ/10); | ||
2086 | break; | ||
2087 | } | ||
2088 | } | ||
2089 | return false; | ||
2090 | } | ||
2091 | |||
2092 | #endif | ||
2093 | |||
2052 | #if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) | 2094 | #if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) |
2053 | static bool dbg_write_eeprom(void) | 2095 | static bool dbg_write_eeprom(void) |
2054 | { | 2096 | { |
@@ -2097,6 +2139,9 @@ bool debug_menu(void) | |||
2097 | bool result; | 2139 | bool result; |
2098 | 2140 | ||
2099 | static const struct menu_item items[] = { | 2141 | static const struct menu_item items[] = { |
2142 | #if defined(TOSHIBA_GIGABEAT_F) | ||
2143 | { "LCD Power Off", dbg_lcd_power_off }, | ||
2144 | #endif | ||
2100 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) | 2145 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) |
2101 | { "Dump ROM contents", dbg_save_roms }, | 2146 | { "Dump ROM contents", dbg_save_roms }, |
2102 | #endif | 2147 | #endif |