diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs.c | 4 | ||||
-rw-r--r-- | apps/codecs.h | 4 | ||||
-rw-r--r-- | apps/debug_menu.c | 53 | ||||
-rw-r--r-- | apps/plugin.c | 5 | ||||
-rw-r--r-- | apps/plugin.h | 4 |
5 files changed, 69 insertions, 1 deletions
diff --git a/apps/codecs.c b/apps/codecs.c index a093c2b601..3af5158fbb 100644 --- a/apps/codecs.c +++ b/apps/codecs.c | |||
@@ -131,9 +131,13 @@ struct codec_api ci = { | |||
131 | system_memory_guard, | 131 | system_memory_guard, |
132 | &cpu_frequency, | 132 | &cpu_frequency, |
133 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 133 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
134 | #ifdef CPU_BOOST_LOGGING | ||
135 | cpu_boost_, | ||
136 | #else | ||
134 | cpu_boost, | 137 | cpu_boost, |
135 | #endif | 138 | #endif |
136 | #endif | 139 | #endif |
140 | #endif | ||
137 | 141 | ||
138 | /* strings and memory */ | 142 | /* strings and memory */ |
139 | snprintf, | 143 | snprintf, |
diff --git a/apps/codecs.h b/apps/codecs.h index dff219c058..cef14c3971 100644 --- a/apps/codecs.h +++ b/apps/codecs.h | |||
@@ -209,9 +209,13 @@ struct codec_api { | |||
209 | int (*system_memory_guard)(int newmode); | 209 | int (*system_memory_guard)(int newmode); |
210 | long *cpu_frequency; | 210 | long *cpu_frequency; |
211 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 211 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
212 | #ifdef CPU_BOOST_LOGGING | ||
213 | void (*cpu_boost_)(bool on_off,char*location,int line); | ||
214 | #else | ||
212 | void (*cpu_boost)(bool on_off); | 215 | void (*cpu_boost)(bool on_off); |
213 | #endif | 216 | #endif |
214 | #endif | 217 | #endif |
218 | #endif | ||
215 | 219 | ||
216 | /* strings and memory */ | 220 | /* strings and memory */ |
217 | int (*snprintf)(char *buf, size_t size, const char *fmt, ...); | 221 | int (*snprintf)(char *buf, size_t size, const char *fmt, ...); |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 081bf2f63e..22db43d272 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -2237,7 +2237,55 @@ static bool dbg_write_eeprom(void) | |||
2237 | return false; | 2237 | return false; |
2238 | } | 2238 | } |
2239 | #endif /* defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) */ | 2239 | #endif /* defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) */ |
2240 | 2240 | #ifdef CPU_BOOST_LOGGING | |
2241 | static bool cpu_boost_log(void) | ||
2242 | { | ||
2243 | int i = 0,j=0; | ||
2244 | int count = cpu_boost_log_getcount(); | ||
2245 | int lines = LCD_HEIGHT/SYSFONT_HEIGHT; | ||
2246 | char *str; | ||
2247 | bool done; | ||
2248 | lcd_setmargins(0, 0); | ||
2249 | lcd_setfont(FONT_SYSFIXED); | ||
2250 | str = cpu_boost_log_getlog_first(); | ||
2251 | while (i < count) | ||
2252 | { | ||
2253 | lcd_clear_display(); | ||
2254 | for(j=0; j<lines; j++,i++) | ||
2255 | { | ||
2256 | if (!str) | ||
2257 | str = cpu_boost_log_getlog_next(); | ||
2258 | if (str) | ||
2259 | { | ||
2260 | lcd_puts(0, j,str); | ||
2261 | } | ||
2262 | str = NULL; | ||
2263 | } | ||
2264 | lcd_update(); | ||
2265 | done = false; | ||
2266 | action_signalscreenchange(); | ||
2267 | while (!done) | ||
2268 | { | ||
2269 | switch(get_action(CONTEXT_STD,TIMEOUT_BLOCK)) | ||
2270 | { | ||
2271 | case ACTION_STD_OK: | ||
2272 | case ACTION_STD_PREV: | ||
2273 | case ACTION_STD_NEXT: | ||
2274 | done = true; | ||
2275 | break; | ||
2276 | case ACTION_STD_CANCEL: | ||
2277 | i = count; | ||
2278 | done = true; | ||
2279 | break; | ||
2280 | } | ||
2281 | } | ||
2282 | } | ||
2283 | get_action(CONTEXT_STD,TIMEOUT_BLOCK); | ||
2284 | lcd_setfont(FONT_UI); | ||
2285 | action_signalscreenchange(); | ||
2286 | return false; | ||
2287 | } | ||
2288 | #endif | ||
2241 | bool debug_menu(void) | 2289 | bool debug_menu(void) |
2242 | { | 2290 | { |
2243 | int m; | 2291 | int m; |
@@ -2312,6 +2360,9 @@ bool debug_menu(void) | |||
2312 | {"logf", logfdisplay }, | 2360 | {"logf", logfdisplay }, |
2313 | {"logfdump", logfdump }, | 2361 | {"logfdump", logfdump }, |
2314 | #endif | 2362 | #endif |
2363 | #ifdef CPU_BOOST_LOGGING | ||
2364 | {"cpu_boost log",cpu_boost_log}, | ||
2365 | #endif | ||
2315 | }; | 2366 | }; |
2316 | 2367 | ||
2317 | m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL, | 2368 | m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL, |
diff --git a/apps/plugin.c b/apps/plugin.c index 250b4cc545..e11fd5cffe 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -250,9 +250,14 @@ static const struct plugin_api rockbox_api = { | |||
250 | #ifndef SIMULATOR | 250 | #ifndef SIMULATOR |
251 | system_memory_guard, | 251 | system_memory_guard, |
252 | &cpu_frequency, | 252 | &cpu_frequency, |
253 | |||
253 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 254 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
255 | #ifdef CPU_BOOST_LOGGING | ||
256 | cpu_boost_, | ||
257 | #else | ||
254 | cpu_boost, | 258 | cpu_boost, |
255 | #endif | 259 | #endif |
260 | #endif | ||
256 | timer_register, | 261 | timer_register, |
257 | timer_unregister, | 262 | timer_unregister, |
258 | timer_set_period, | 263 | timer_set_period, |
diff --git a/apps/plugin.h b/apps/plugin.h index b2d894f0ee..64cc208aae 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -344,8 +344,12 @@ struct plugin_api { | |||
344 | int (*system_memory_guard)(int newmode); | 344 | int (*system_memory_guard)(int newmode); |
345 | long *cpu_frequency; | 345 | long *cpu_frequency; |
346 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 346 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
347 | #ifdef CPU_BOOST_LOGGING | ||
348 | void (*cpu_boost_)(bool on_off,char*location,int line); | ||
349 | #else | ||
347 | void (*cpu_boost)(bool on_off); | 350 | void (*cpu_boost)(bool on_off); |
348 | #endif | 351 | #endif |
352 | #endif | ||
349 | bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), | 353 | bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), |
350 | long cycles, int int_prio, | 354 | long cycles, int int_prio, |
351 | void (*timer_callback)(void)); | 355 | void (*timer_callback)(void)); |