blob: dd5b9ba1e8f06ead7add0b81b8d43016ad1cc79e [file] [log] [blame]
Daniel Stenberg1c0c8612002-05-17 12:22:24 +00001/***************************************************************************
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 ****************************************************************************/
Björn Stenberg2ac05722002-05-26 17:03:17 +000019#include <stdbool.h>
Justin Heinerb5025a82002-08-31 04:58:35 +000020
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000021#include "lcd.h"
Daniel Stenberg93b231c2002-09-12 13:33:59 +000022#include "font.h"
Justin Heinerb5025a82002-08-31 04:58:35 +000023#include "backlight.h"
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000024#include "menu.h"
Björn Stenbergb21a3bd2002-05-21 14:25:45 +000025#include "button.h"
26#include "kernel.h"
27#include "debug.h"
Justin Heiner26302452002-08-23 02:17:00 +000028#include "usb.h"
Björn Stenbergcd225732002-08-11 09:17:47 +000029#include "panic.h"
Markus Braun5e4c1d22002-08-20 19:37:00 +000030#include "settings.h"
31#include "status.h"
Markus Braun000c2db2002-08-30 13:49:32 +000032
Daniel Stenbergbf603f92002-06-14 08:47:44 +000033#ifdef HAVE_LCD_BITMAP
34#include "icons.h"
Markus Braun000c2db2002-08-30 13:49:32 +000035#include "widgets.h"
Daniel Stenbergbf603f92002-06-14 08:47:44 +000036#endif
Markus Braun000c2db2002-08-30 13:49:32 +000037
Björn Stenberg2ac05722002-05-26 17:03:17 +000038struct menu {
Björn Stenbergf76cee72002-05-28 15:35:33 +000039 int top;
Björn Stenberg2ac05722002-05-26 17:03:17 +000040 int cursor;
41 struct menu_items* items;
42 int itemcount;
43};
44
45#define MAX_MENUS 4
46
Björn Stenbergf76cee72002-05-28 15:35:33 +000047#ifdef HAVE_LCD_BITMAP
Markus Braun000c2db2002-08-30 13:49:32 +000048
49#define MARGIN_X (global_settings.scrollbar ? SCROLLBAR_WIDTH : 0) + CURSOR_WIDTH /* X pixel margin */
50#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) /* Y pixel margin */
51
52#define LINE_X 0 /* X position the entry-list starts at */
Markus Braun5e4c1d22002-08-20 19:37:00 +000053#define LINE_Y (global_settings.statusbar ? 1 : 0) /* Y position the entry-list starts at */
Markus Braun000c2db2002-08-30 13:49:32 +000054
Daniel Stenberg93b231c2002-09-12 13:33:59 +000055//FIXME remove
56#define LINE_HEIGTH 8 /* pixels for each text line */
57//FIXME remove
Markus Braun5e4c1d22002-08-20 19:37:00 +000058#define MENU_LINES (LCD_HEIGHT / LINE_HEIGTH - LINE_Y)
Markus Braun000c2db2002-08-30 13:49:32 +000059
60#define CURSOR_X (global_settings.scrollbar ? 1 : 0)
61#define CURSOR_Y 0 /* the cursor is not positioned in regard to
62 the margins, so this is the amount of lines
63 we add to the cursor Y position to position
64 it on a line */
65#define CURSOR_WIDTH 4
66
67#define SCROLLBAR_X 0
68#define SCROLLBAR_Y lcd_getymargin()
69#define SCROLLBAR_WIDTH 6
70
71#else /* HAVE_LCD_BITMAP */
72
Justin Heinerb5025a82002-08-31 04:58:35 +000073#define LINE_X 1 /* X position the entry-list starts at */
Markus Braun000c2db2002-08-30 13:49:32 +000074
Björn Stenbergf76cee72002-05-28 15:35:33 +000075#define MENU_LINES 2
Markus Braun000c2db2002-08-30 13:49:32 +000076
77#define CURSOR_X 0
78#define CURSOR_Y 0 /* not really used for players */
79
80#endif /* HAVE_LCD_BITMAP */
Björn Stenbergf76cee72002-05-28 15:35:33 +000081
Björn Stenberg9314a682002-05-31 09:04:51 +000082#ifdef HAVE_NEW_CHARCELL_LCD
Björn Stenberg3b974742002-09-09 23:57:00 +000083#define CURSOR_CHAR 0x7e
Björn Stenberg9314a682002-05-31 09:04:51 +000084#else
Björn Stenberg3b974742002-09-09 23:57:00 +000085#define CURSOR_CHAR 0x89
Björn Stenberg9314a682002-05-31 09:04:51 +000086#endif
Björn Stenberg9314a682002-05-31 09:04:51 +000087
Björn Stenberg2ac05722002-05-26 17:03:17 +000088static struct menu menus[MAX_MENUS];
89static bool inuse[MAX_MENUS] = { false };
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000090
Daniel Stenberg93b231c2002-09-12 13:33:59 +000091/* count in letter positions, NOT pixels */
Daniel Stenbergbf603f92002-06-14 08:47:44 +000092void put_cursorxy(int x, int y, bool on)
93{
Björn Stenberg71f71ef2002-08-11 09:20:53 +000094#ifdef HAVE_LCD_BITMAP
Daniel Stenberg93b231c2002-09-12 13:33:59 +000095 int fh, fw;
96 lcd_getfontsize(FONT_UI, &fw, &fh);
Björn Stenberg71f71ef2002-08-11 09:20:53 +000097#endif
Björn Stenbergcd225732002-08-11 09:17:47 +000098
Daniel Stenbergbf603f92002-06-14 08:47:44 +000099 /* place the cursor */
100 if(on) {
101#ifdef HAVE_LCD_BITMAP
102 lcd_bitmap ( bitmap_icons_6x8[Cursor],
Markus Braun5e4c1d22002-08-20 19:37:00 +0000103 x*6, y*fh + lcd_getymargin(), 4, 8, true);
Daniel Stenberge35f8eb2002-06-15 11:39:36 +0000104#elif defined(SIMULATOR)
Daniel Stenbergc4be1ee2002-06-19 13:00:14 +0000105 /* player simulator */
Daniel Stenberge35f8eb2002-06-15 11:39:36 +0000106 unsigned char cursor[] = { 0x7f, 0x3e, 0x1c, 0x08 };
Daniel Stenberg7cdf5c82002-08-09 09:13:00 +0000107 lcd_bitmap ( cursor, x*6, 12+y*16, 4, 8, true);
Daniel Stenbergbf603f92002-06-14 08:47:44 +0000108#else
Björn Stenberg3b974742002-09-09 23:57:00 +0000109 lcd_putc(x, y, CURSOR_CHAR);
Daniel Stenbergbf603f92002-06-14 08:47:44 +0000110#endif
111 }
112 else {
Daniel Stenbergc4be1ee2002-06-19 13:00:14 +0000113#if defined(HAVE_LCD_BITMAP)
Daniel Stenbergbf603f92002-06-14 08:47:44 +0000114 /* I use xy here since it needs to disregard the margins */
Markus Braun5e4c1d22002-08-20 19:37:00 +0000115 lcd_clearrect (x*6, y*fh + lcd_getymargin(), 4, 8);
Daniel Stenbergc4be1ee2002-06-19 13:00:14 +0000116#elif defined(SIMULATOR)
117 /* player simulator in action */
Daniel Stenberg7cdf5c82002-08-09 09:13:00 +0000118 lcd_clearrect (x*6, 12+y*16, 4, 8);
Daniel Stenbergbf603f92002-06-14 08:47:44 +0000119#else
Björn Stenberg3b974742002-09-09 23:57:00 +0000120 lcd_putc(x, y, ' ');
Daniel Stenbergbf603f92002-06-14 08:47:44 +0000121#endif
122 }
123}
124
Björn Stenbergf76cee72002-05-28 15:35:33 +0000125static void menu_draw(int m)
126{
127 int i = 0;
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000128#if LCD_PROPFONTS
129 int fw, fh;
Björn Stenbergcd225732002-08-11 09:17:47 +0000130 int menu_lines;
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000131 lcd_getfontsize(FONT_UI, &fw, &fh);
Markus Braun5e4c1d22002-08-20 19:37:00 +0000132 if (global_settings.statusbar)
133 menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
134 else
135 menu_lines = LCD_HEIGHT/fh;
Björn Stenbergcd225732002-08-11 09:17:47 +0000136#else
137 int menu_lines = MENU_LINES;
138#endif
Björn Stenbergf76cee72002-05-28 15:35:33 +0000139
Daniel Stenberga8e89fd2002-08-22 21:45:22 +0000140 lcd_scroll_pause(); /* halt scroll first... */
141 lcd_clear_display(); /* ...then clean the screen */
Björn Stenbergf76cee72002-05-28 15:35:33 +0000142#ifdef HAVE_LCD_BITMAP
Markus Braun000c2db2002-08-30 13:49:32 +0000143 lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000144 lcd_setfont(FONT_UI);
Björn Stenbergf76cee72002-05-28 15:35:33 +0000145#endif
Markus Braun5e4c1d22002-08-20 19:37:00 +0000146 /* correct cursor pos if out of screen */
147 if (menus[m].cursor - menus[m].top >= menu_lines)
148 menus[m].top++;
149
Björn Stenbergf76cee72002-05-28 15:35:33 +0000150 for (i = menus[m].top;
Björn Stenbergcd225732002-08-11 09:17:47 +0000151 (i < menus[m].itemcount) && (i<menus[m].top+menu_lines);
Björn Stenbergf76cee72002-05-28 15:35:33 +0000152 i++) {
Linus Nielsen Feltzing8fa02172002-08-02 07:59:25 +0000153 if((menus[m].cursor - menus[m].top)==(i-menus[m].top))
Markus Braun000c2db2002-08-30 13:49:32 +0000154 lcd_puts_scroll(LINE_X, i-menus[m].top, menus[m].items[i].desc);
Linus Nielsen Feltzing8fa02172002-08-02 07:59:25 +0000155 else
Markus Braun000c2db2002-08-30 13:49:32 +0000156 lcd_puts(LINE_X, i-menus[m].top, menus[m].items[i].desc);
Björn Stenbergf76cee72002-05-28 15:35:33 +0000157 }
Robert Hakc501ac72002-05-30 08:06:42 +0000158
Daniel Stenbergbf603f92002-06-14 08:47:44 +0000159 /* place the cursor */
Markus Braun000c2db2002-08-30 13:49:32 +0000160 put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
Markus Braun5e4c1d22002-08-20 19:37:00 +0000161#ifdef HAVE_LCD_BITMAP
Markus Braun000c2db2002-08-30 13:49:32 +0000162 if (global_settings.scrollbar)
163 scrollbar(SCROLLBAR_X, SCROLLBAR_Y, SCROLLBAR_WIDTH - 1,
164 LCD_HEIGHT - SCROLLBAR_Y, menus[m].itemcount, menus[m].top,
165 menus[m].top + menu_lines, VERTICAL);
Markus Braun5e4c1d22002-08-20 19:37:00 +0000166#endif
Markus Braun000c2db2002-08-30 13:49:32 +0000167 status_draw();
Björn Stenbergf76cee72002-05-28 15:35:33 +0000168 lcd_update();
169}
170
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000171/*
172 * Move the cursor to a particular id,
173 * target: where you want it to be
174 */
Björn Stenberg2ac05722002-05-26 17:03:17 +0000175static void put_cursor(int m, int target)
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000176{
Robert Hakc501ac72002-05-30 08:06:42 +0000177 bool do_update = true;
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000178#if LCD_PROPFONTS
179 int fw, fh;
Björn Stenbergcd225732002-08-11 09:17:47 +0000180 int menu_lines;
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000181 lcd_getfontsize(FONT_UI, &fw, &fh);
Markus Braun5e4c1d22002-08-20 19:37:00 +0000182 if (global_settings.statusbar)
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000183 menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
Markus Braun5e4c1d22002-08-20 19:37:00 +0000184 else
185 menu_lines = LCD_HEIGHT/fh;
Björn Stenbergcd225732002-08-11 09:17:47 +0000186#else
187 int menu_lines = MENU_LINES;
188#endif
Daniel Stenberg93b231c2002-09-12 13:33:59 +0000189
Markus Braun000c2db2002-08-30 13:49:32 +0000190 put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, false);
Robert Hakc501ac72002-05-30 08:06:42 +0000191 menus[m].cursor = target;
Linus Nielsen Feltzing8fa02172002-08-02 07:59:25 +0000192 menu_draw(m);
Björn Stenbergf76cee72002-05-28 15:35:33 +0000193
194 if ( target < menus[m].top ) {
195 menus[m].top--;
196 menu_draw(m);
Robert Hakc501ac72002-05-30 08:06:42 +0000197 do_update = false;
Björn Stenbergf76cee72002-05-28 15:35:33 +0000198 }
Björn Stenbergcd225732002-08-11 09:17:47 +0000199 else if ( target-menus[m].top > menu_lines-1 ) {
Björn Stenbergf76cee72002-05-28 15:35:33 +0000200 menus[m].top++;
201 menu_draw(m);
Robert Hakc501ac72002-05-30 08:06:42 +0000202 do_update = false;
Björn Stenbergf76cee72002-05-28 15:35:33 +0000203 }
Robert Hakc501ac72002-05-30 08:06:42 +0000204
205 if (do_update) {
Markus Braun000c2db2002-08-30 13:49:32 +0000206 put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
Robert Hakc501ac72002-05-30 08:06:42 +0000207 lcd_update();
208 }
209
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000210}
211
Björn Stenberg2ac05722002-05-26 17:03:17 +0000212int menu_init(struct menu_items* mitems, int count)
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000213{
Björn Stenberg2ac05722002-05-26 17:03:17 +0000214 int i;
215
216 for ( i=0; i<MAX_MENUS; i++ ) {
217 if ( !inuse[i] ) {
218 inuse[i] = true;
219 break;
220 }
221 }
222 if ( i == MAX_MENUS ) {
223 DEBUGF("Out of menus!\n");
224 return -1;
225 }
226 menus[i].items = mitems;
227 menus[i].itemcount = count;
Björn Stenbergf76cee72002-05-28 15:35:33 +0000228 menus[i].top = 0;
Björn Stenberg2ac05722002-05-26 17:03:17 +0000229 menus[i].cursor = 0;
230
231 return i;
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000232}
233
Björn Stenberg2ac05722002-05-26 17:03:17 +0000234void menu_exit(int m)
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000235{
Björn Stenberg2ac05722002-05-26 17:03:17 +0000236 inuse[m] = false;
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000237}
238
Daniel Stenbergb2850762002-08-23 12:32:52 +0000239Menu menu_run(int m)
Robert Hak7ec9aa32002-05-18 11:41:37 +0000240{
Daniel Stenbergb2850762002-08-23 12:32:52 +0000241 Menu result = MENU_OK;
Justin Heiner26302452002-08-23 02:17:00 +0000242
Björn Stenberg2ac05722002-05-26 17:03:17 +0000243 menu_draw(m);
Justin Heiner26302452002-08-23 02:17:00 +0000244
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000245 while(1) {
Markus Braun5e4c1d22002-08-20 19:37:00 +0000246 switch( button_get_w_tmo(HZ/2) ) {
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000247#ifdef HAVE_RECORDER_KEYPAD
248 case BUTTON_UP:
Björn Stenbergcbc71792002-08-10 09:04:55 +0000249 case BUTTON_UP | BUTTON_REPEAT:
Robert Hak7ec9aa32002-05-18 11:41:37 +0000250#else
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000251 case BUTTON_LEFT:
Linus Nielsen Feltzing8fa02172002-08-02 07:59:25 +0000252 case BUTTON_LEFT | BUTTON_REPEAT:
Robert Hak7ec9aa32002-05-18 11:41:37 +0000253#endif
Björn Stenberg4caebab2002-05-29 14:25:06 +0000254 if (menus[m].cursor) {
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000255 /* move up */
Björn Stenberg2ac05722002-05-26 17:03:17 +0000256 put_cursor(m, menus[m].cursor-1);
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000257 }
Eric Linenbergc076b272002-09-04 04:21:10 +0000258 else {
259 /* move to bottom */
260#ifdef HAVE_RECORDER_KEYPAD
261 menus[m].top = menus[m].itemcount-9;
262#else
263 menus[m].top = menus[m].itemcount-3;
264#endif
265 if (menus[m].top < 0)
266 menus[m].top = 0;
267 menus[m].cursor = menus[m].itemcount-1;
268 put_cursor(m, menus[m].itemcount-1);
269 }
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000270 break;
Robert Hakdfba2102002-05-21 08:47:34 +0000271
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000272#ifdef HAVE_RECORDER_KEYPAD
273 case BUTTON_DOWN:
Björn Stenbergcbc71792002-08-10 09:04:55 +0000274 case BUTTON_DOWN | BUTTON_REPEAT:
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000275#else
276 case BUTTON_RIGHT:
Linus Nielsen Feltzing8fa02172002-08-02 07:59:25 +0000277 case BUTTON_RIGHT | BUTTON_REPEAT:
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000278#endif
Björn Stenberg4caebab2002-05-29 14:25:06 +0000279 if (menus[m].cursor < menus[m].itemcount-1) {
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000280 /* move down */
Björn Stenberg2ac05722002-05-26 17:03:17 +0000281 put_cursor(m, menus[m].cursor+1);
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000282 }
Eric Linenbergc076b272002-09-04 04:21:10 +0000283 else {
284 /* move to top */
285 menus[m].top = 0;
286 menus[m].cursor = 0;
287 put_cursor(m, 0);
288 }
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000289 break;
290
291#ifdef HAVE_RECORDER_KEYPAD
292 case BUTTON_RIGHT:
293#endif
294 case BUTTON_PLAY:
295 /* Erase current display state */
Daniel Stenberga8e89fd2002-08-22 21:45:22 +0000296 lcd_scroll_pause(); /* pause is better than stop when
297 are gonna clear the screen anyway */
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000298 lcd_clear_display();
299
Daniel Stenberg49984fa2002-08-23 12:57:00 +0000300 /* if a child returns that the contents is changed, we
301 must remember this, even if we perhaps invoke other
302 children too before returning back */
303 if(MENU_DISK_CHANGED ==
304 menus[m].items[menus[m].cursor].function())
305 result = MENU_DISK_CHANGED;
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000306
307 /* Return to previous display state */
Björn Stenberg2ac05722002-05-26 17:03:17 +0000308 menu_draw(m);
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000309 break;
310
311#ifdef HAVE_RECORDER_KEYPAD
312 case BUTTON_LEFT:
Linus Nielsen Feltzinga552f4c2002-07-27 19:53:26 +0000313 case BUTTON_F1:
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000314#else
315 case BUTTON_STOP:
Björn Stenberg60fad542002-05-29 12:28:08 +0000316 case BUTTON_MENU:
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000317#endif
Linus Nielsen Feltzing8fa02172002-08-02 07:59:25 +0000318 lcd_stop_scroll();
Björn Stenberg90851c52002-09-02 14:50:37 +0000319 while (button_get(false)); /* clear button queue */
Daniel Stenbergb2850762002-08-23 12:32:52 +0000320 return result;
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000321
Markus Braun5e4c1d22002-08-20 19:37:00 +0000322#ifdef HAVE_RECORDER_KEYPAD
Markus Braun000c2db2002-08-30 13:49:32 +0000323 case BUTTON_F3: {
Markus Braun5e4c1d22002-08-20 19:37:00 +0000324#ifdef HAVE_LCD_BITMAP
Markus Braun000c2db2002-08-30 13:49:32 +0000325 unsigned char state;
326 state = global_settings.statusbar << 1 | global_settings.scrollbar;
327 state = (state + 1) % 4;
328 global_settings.statusbar = state >> 1;
329 global_settings.scrollbar = state & 0x1;
330 settings_save();
331
332 menu_draw(m);
Markus Braun5e4c1d22002-08-20 19:37:00 +0000333#endif
Markus Braun000c2db2002-08-30 13:49:32 +0000334 }
Markus Braun5e4c1d22002-08-20 19:37:00 +0000335 break;
336#endif
337
Justin Heiner26302452002-08-23 02:17:00 +0000338#ifndef SIMULATOR
339 case SYS_USB_CONNECTED:
Justin Heinerb5025a82002-08-31 04:58:35 +0000340 backlight_time(4);
Justin Heiner26302452002-08-23 02:17:00 +0000341 usb_acknowledge(SYS_USB_CONNECTED_ACK);
342 usb_wait_for_disconnect(&button_queue);
Justin Heinerb5025a82002-08-31 04:58:35 +0000343 backlight_time(global_settings.backlight);
Björn Stenberg40d866b2002-09-01 20:08:08 +0000344#ifdef HAVE_LCD_CHARCELLS
Justin Heiner26302452002-08-23 02:17:00 +0000345 lcd_icon(ICON_PARAM, true);
346#endif
Daniel Stenberg49984fa2002-08-23 12:57:00 +0000347 menu_draw(m);
Daniel Stenbergaa458aa2002-08-23 12:41:25 +0000348 result = MENU_DISK_CHANGED;
Justin Heiner26302452002-08-23 02:17:00 +0000349 break;
350#endif
351
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000352 default:
353 break;
354 }
355
Markus Braun5e4c1d22002-08-20 19:37:00 +0000356 status_draw();
Björn Stenbergb21a3bd2002-05-21 14:25:45 +0000357 lcd_update();
358 }
Daniel Stenbergb2850762002-08-23 12:32:52 +0000359
360 return result;
Robert Hak7ec9aa32002-05-18 11:41:37 +0000361}