summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/recorder/blank.c93
1 files changed, 93 insertions, 0 deletions
diff --git a/apps/recorder/blank.c b/apps/recorder/blank.c
new file mode 100644
index 0000000000..2bf345115b
--- /dev/null
+++ b/apps/recorder/blank.c
@@ -0,0 +1,93 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Robert E. 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
20#include "config.h"
21
22#ifdef HAVE_LCD_BITMAP
23
24#include "lcd.h"
25#include "button.h"
26#include "kernel.h"
27
28#ifdef SIMULATOR
29#include <stdio.h>
30#endif
31#include <string.h>
32
33#define SS_TITLE "Blank"
34#define SS_TITLE_FONT 2
35
36void blank(void)
37{
38 int w, h, b;
39 char *off = "[Off] to stop";
40 int len = strlen(SS_TITLE);
41
42 lcd_getfontsize(SS_TITLE_FONT, &w, &h);
43
44 /* Get horizontel centering for text */
45 len *= w;
46 if (len%2 != 0)
47 len = ((len+1)/2)+(w/2);
48 else
49 len /= 2;
50
51 if (h%2 != 0)
52 h = (h/2)+1;
53 else
54 h /= 2;
55
56 lcd_clear_display();
57 lcd_putsxy(LCD_WIDTH/2-len, (LCD_HEIGHT/2)-h, SS_TITLE, SS_TITLE_FONT);
58
59 len = strlen(off);
60 lcd_getfontsize(0, &w, &h);
61
62 /* Get horizontel centering for text */
63 len *= w;
64 if (len%2 != 0)
65 len = ((len+1)/2)+(w/2);
66 else
67 len /= 2;
68
69 if (h%2 != 0)
70 h = (h/2)+1;
71 else
72 h /= 2;
73
74 lcd_putsxy(LCD_WIDTH/2-len, LCD_HEIGHT-(2*h), off, 0);
75
76 lcd_update();
77 sleep(HZ);
78
79 lcd_clear_display();
80 lcd_update();
81
82 while(1) {
83 if(button_get(false))
84 return;
85 sleep(HZ/10);
86 }
87
88}
89
90#endif
91
92
93