diff options
Diffstat (limited to 'apps/demo_menu.c')
-rw-r--r-- | apps/demo_menu.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/apps/demo_menu.c b/apps/demo_menu.c new file mode 100644 index 0000000000..cbd5742c7c --- /dev/null +++ b/apps/demo_menu.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Robert Hak | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #include "config.h" | ||
20 | #include "options.h" | ||
21 | |||
22 | #ifdef HAVE_LCD_BITMAP | ||
23 | #ifdef USE_DEMOS | ||
24 | |||
25 | #include <stdio.h> | ||
26 | #include <stdbool.h> | ||
27 | #include "lcd.h" | ||
28 | #include "menu.h" | ||
29 | #include "demo_menu.h" | ||
30 | #include "button.h" | ||
31 | #include "kernel.h" | ||
32 | #include "sprintf.h" | ||
33 | |||
34 | extern Menu bounce(void); | ||
35 | extern Menu snow(void); | ||
36 | |||
37 | Menu demo_menu(void) | ||
38 | { | ||
39 | int m; | ||
40 | Menu result; | ||
41 | |||
42 | struct menu_items items[] = { | ||
43 | { "Bounce", bounce }, | ||
44 | { "Snow", snow }, | ||
45 | }; | ||
46 | |||
47 | m=menu_init( items, sizeof items / sizeof(struct menu_items) ); | ||
48 | result = menu_run(m); | ||
49 | menu_exit(m); | ||
50 | |||
51 | return result; | ||
52 | } | ||
53 | |||
54 | #endif | ||
55 | #endif | ||