+ badge_framebuffer_flush(&fb);
+ usbMSCInit();
+ for(;;);
+}
+
+static void fahrplan(void) {
+ f_chdir("/fahrplan");
+ badge_browse_textfiles("fahrplan.lst");
+}
+
+uint8_t main_menu_show(uint8_t selected) {
+ char const menu_buf[][15] = {
+ "Vanity-Screen",
+ "Super Hackio",
+ "Fahrplan",
+ "USB-Modus"
+ };
+
+ char const *menu[ARRAY_SIZE(menu_buf)];
+ for(uint8_t i = 0; i < ARRAY_SIZE(menu_buf); ++i) {
+ menu[i] = menu_buf[i];
+ }
+
+ f_chdir("/");
+ // first_visible = 0, weil MenĂ¼ so kurz. Ggf. Parameter aus main_menu empfangen und merken.
+ size_t first_visible = 0;
+ return (uint8_t) badge_menu(menu, ARRAY_SIZE(menu), &first_visible, selected);
+}
+
+void main_menu(void) {
+ uint8_t selected = 0;
+
+ for(;;) {
+ selected = main_menu_show(selected);
+ switch(selected) {
+ case 0: badge_vanity_show(); break;
+ case 1: jumpnrun_play (); break;
+ case 2: fahrplan (); break;
+ case 3: usbmode (); break;
+ }
+ }
+}
+