#include "init.h"
#include "ui/display.h"
-#include "ui/sprite.h"
#include "ui/event.h"
#include "ui/font.h"
+#include "ui/menu.h"
+#include "ui/sprite.h"
#include "util/util.h"
#include "jumpnrun/jumpnrun.h"
#endif
-/**************************************************************************/
-/*!
- Main program entry point. After reset, normal code execution will
- begin here.
+void usbmode(void) {
+ badge_framebuffer fb = { { { 0 } } };
+
+ badge_framebuffer_render_text(&fb, 23, 30, "USB-Modus");
+/*
+ badge_framebuffer_render_number(&fb, 23, 50, sizeof(jumpnrun_tile));
+ badge_framebuffer_render_number(&fb, 33, 50, sizeof(jumpnrun_item));
+ badge_framebuffer_render_number(&fb, 48, 50, sizeof(jumpnrun_enemy));
*/
-/**************************************************************************/
+ badge_framebuffer_flush(&fb);
+ usbMSCInit();
+ for(;;);
+}
+
+void scrolltest(void) {
+ badge_browse_textfile("/fahrplan/test.txt");
+}
+
int main(void)
{
- // Configure cpu and mandatory peripherals
- //systemInit();
-
cpuInit();
systickInit(CFG_SYSTICK_DELAY_IN_MS);
f_mount(0, &fs);
if(badge_input_raw() & BADGE_EVENT_KEY_DOWN) {
- badge_framebuffer fb = { { { 0 } } };
-
- fb.data[0][0] = badge_framebuffer_render_text(&fb, 23, 30, "USB-Modus");
- badge_framebuffer_flush(&fb);
- usbMSCInit();
- for(;;);
+ usbmode();
}
badge_event_start();
+
+ if(badge_input_raw() & BADGE_EVENT_KEY_UP) {
+ scrolltest();
+ }
+
jumpnrun_play();
+ usbmode();
return 0;
}