summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-09-02 02:26:26 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-09-02 02:26:26 +0000
commitbd7af68ccde0065014f4faacb3f839825b79aa3c (patch)
tree63fb6716c4c74ee61bad50bac8c6da2c664029dc
parentbe17fff1387da9500e707bf0f1e0fdd02c7dd627 (diff)
downloadrockbox-bd7af68ccde0065014f4faacb3f839825b79aa3c.tar.gz
rockbox-bd7af68ccde0065014f4faacb3f839825b79aa3c.zip
battery_bench: make functions/struct/variables static
remove useless declarations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27979 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/battery_bench.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index bb0e4f594b..b82e4f858c 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -236,22 +236,10 @@
236#endif 236#endif
237 237
238/****************************** Plugin Entry Point ****************************/ 238/****************************** Plugin Entry Point ****************************/
239int main(void); 239static long start_tick;
240bool exit_tsr(bool);
241void thread(void);
242
243
244enum plugin_status plugin_start(const void* parameter)
245{
246 (void)parameter;
247
248 return main();
249}
250
251long start_tick;
252 240
253/* Struct for battery information */ 241/* Struct for battery information */
254struct batt_info 242static struct batt_info
255{ 243{
256 /* the size of the struct elements is optimised to make the struct size 244 /* the size of the struct elements is optimised to make the struct size
257 * a power of 2 */ 245 * a power of 2 */
@@ -269,7 +257,7 @@ static struct event_queue thread_q;
269static bool in_usb_mode; 257static bool in_usb_mode;
270static unsigned int buf_idx; 258static unsigned int buf_idx;
271 259
272bool exit_tsr(bool reenter) 260static bool exit_tsr(bool reenter)
273{ 261{
274 long button; 262 long button;
275 (void)reenter; 263 (void)reenter;
@@ -305,7 +293,7 @@ bool exit_tsr(bool reenter)
305#define HMS(x) (x)/3600,((x)%3600)/60,((x)%3600)%60 293#define HMS(x) (x)/3600,((x)%3600)/60,((x)%3600)%60
306 294
307/* use long for aligning */ 295/* use long for aligning */
308unsigned long thread_stack[THREAD_STACK_SIZE/sizeof(long)]; 296static unsigned long thread_stack[THREAD_STACK_SIZE/sizeof(long)];
309 297
310#if CONFIG_CHARGING || defined(HAVE_USB_POWER) 298#if CONFIG_CHARGING || defined(HAVE_USB_POWER)
311static unsigned int charge_state(void) 299static unsigned int charge_state(void)
@@ -378,7 +366,7 @@ static void flush_buffer(void* data)
378} 366}
379 367
380 368
381void thread(void) 369static void thread(void)
382{ 370{
383 bool exit = false; 371 bool exit = false;
384 char *exit_reason = "unknown"; 372 char *exit_reason = "unknown";
@@ -467,8 +455,9 @@ static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, in
467} 455}
468#endif 456#endif
469 457
470int main(void) 458enum plugin_status plugin_start(const void* parameter)
471{ 459{
460 (void)parameter;
472 int button, fd; 461 int button, fd;
473 bool on = false; 462 bool on = false;
474 start_tick = *rb->current_tick; 463 start_tick = *rb->current_tick;