1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2010 Thomas Martitz
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 /* Include Standard files */
32 #include "backlight.h"
33 #include "button-target.h"
39 extern int show_logo();
41 JNIEXPORT
void JNICALL Java_com_example_rbboot_RockboxBootloader_main
47 LOG("%s(): %ld", __func__, current_tick);
51 static long test_stack
[1<<10];
52 static char test_thread_name
[] = "test";
53 void test_thread(void)
57 LOG("%s()", __func__
);
62 static long test_stack2
[1<<10];
63 static char test_thread_name2
[] = "test2";
64 void test_thread2(void)
68 LOG("%s()", __func__
);
77 LOG("Hello Rockbox!");
83 lcd_setfont(FONT_SYSFIXED
);
85 tick_add_task(test_tick
);
89 create_thread(test_thread
, test_stack
, sizeof(test_stack
), 0, test_thread_name
, PRIORITY_USER_INTERFACE
);
90 create_thread(test_thread2
, test_stack2
, sizeof(test_stack2
), 0, test_thread_name2
, PRIORITY_USER_INTERFACE
);
94 LOG("before yield()");
96 button_read_device(&data
);
97 printf("hello tick %d:%d", data
>>16, data
&0xffff);
106 if(button_read_device(&touch_data
) & BUTTON_MENU
)
109 printf("Rockbox boot loader");
110 printf("Version " RBVERSION
);
112 while (delay
-- > 0); /* avoid warning */