summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-08-11 09:17:47 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-08-11 09:17:47 +0000
commitcd225736f95555c7083b642675d013bff8057d76 (patch)
treeb3e1bde3e0a22f11911401ea232e553341aee40c /firmware
parent13fdf7e5a5df4cd2f34615c15fddd56f92e84d91 (diff)
downloadrockbox-cd225736f95555c7083b642675d013bff8057d76.tar.gz
rockbox-cd225736f95555c7083b642675d013bff8057d76.zip
First version of loadable fonts patch by Alex Gitelman
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1666 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/Makefile13
-rw-r--r--firmware/common/dir.c1
-rw-r--r--firmware/drivers/fat.c38
-rw-r--r--firmware/drivers/lcd.c198
-rw-r--r--firmware/drivers/lcd.h11
-rw-r--r--firmware/mpeg.c2
-rw-r--r--firmware/panic.c5
7 files changed, 230 insertions, 38 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 69a27a1b40..eb173848f3 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -15,6 +15,8 @@ OC = sh-elf-objcopy
15 15
16INCLUDES=-Iinclude -I. -Icommon -Idrivers 16INCLUDES=-Iinclude -I. -Icommon -Idrivers
17 17
18SYSTEM_FONT = fonts/alt6x10.bdf
19
18# Pick a target to build for 20# Pick a target to build for
19TARGET = -DARCHOS_PLAYER=1 21TARGET = -DARCHOS_PLAYER=1
20#TARGET = -DARCHOS_PLAYER_OLD=1 22#TARGET = -DARCHOS_PLAYER_OLD=1
@@ -23,7 +25,7 @@ TARGET = -DARCHOS_PLAYER=1
23# store output files in this directory: 25# store output files in this directory:
24OBJDIR = . 26OBJDIR = .
25 27
26CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) 28CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
27 29
28ifdef DEBUG 30ifdef DEBUG
29CFLAGS += -g -DDEBUG 31CFLAGS += -g -DDEBUG
@@ -39,7 +41,11 @@ DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc
39 41
40OUTPUT = $(OBJDIR)/librockbox.a 42OUTPUT = $(OBJDIR)/librockbox.a
41 43
42$(OUTPUT): $(OBJS) 44ifdef LOADABLE_FONTS
45 EXTRA_TARGETS = $(OBJDIR)/system.ajf
46endif
47
48$(OUTPUT): $(OBJS) $(EXTRA_TARGETS)
43 $(AR) ruv $@ $+ 49 $(AR) ruv $@ $+
44 50
45$(OBJDIR)/%.o: %.c 51$(OBJDIR)/%.o: %.c
@@ -50,6 +56,9 @@ $(OBJDIR)/%.o: %.S
50 @mkdir -p `dirname $@` 56 @mkdir -p `dirname $@`
51 $(CC) $(CFLAGS) -c $< -o $@ 57 $(CC) $(CFLAGS) -c $< -o $@
52 58
59$(OBJDIR)/system.ajf: ../tools/bdf2ajf $(SYSTEM_FONT)
60 ../tools/bdf2ajf -f $(SYSTEM_FONT) -o $(OBJDIR)/system.ajf
61
53clean: 62clean:
54 rm -f $(OBJS) $(OUTPUT) 63 rm -f $(OBJS) $(OUTPUT)
55 rm -rf $(OBJDIR)/$(DEPS) 64 rm -rf $(OBJDIR)/$(DEPS)
diff --git a/firmware/common/dir.c b/firmware/common/dir.c
index 473997bd37..809e1a28e5 100644
--- a/firmware/common/dir.c
+++ b/firmware/common/dir.c
@@ -107,6 +107,7 @@ struct dirent* readdir(DIR* dir)
107 107
108 if ( !entry.name[0] ) 108 if ( !entry.name[0] )
109 return NULL; 109 return NULL;
110
110 111
111 strncpy(theent->d_name, entry.name, sizeof( theent->d_name ) ); 112 strncpy(theent->d_name, entry.name, sizeof( theent->d_name ) );
112 theent->attribute = entry.attr; 113 theent->attribute = entry.attr;
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 75915bd710..7fe011c863 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -27,6 +27,7 @@
27#include <sys/timeb.h> 27#include <sys/timeb.h>
28#endif 28#endif
29#include <stdbool.h> 29#include <stdbool.h>
30#include <unicode.h>
30#include "fat.h" 31#include "fat.h"
31#include "ata.h" 32#include "ata.h"
32#include "debug.h" 33#include "debug.h"
@@ -1029,12 +1030,14 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry)
1029 /* replace shortname with longname? */ 1030 /* replace shortname with longname? */
1030 if ( longs ) { 1031 if ( longs ) {
1031 int j,k,l=0; 1032 int j,k,l=0;
1032
1033 /* iterate backwards through the dir entries */ 1033 /* iterate backwards through the dir entries */
1034 for (j=longs-1; j>=0; j--) { 1034 for (j=longs-1; j>=0; j--) {
1035 unsigned char* ptr = dir->cached_buf; 1035 unsigned char* ptr = dir->cached_buf;
1036 int index = longarray[j]; 1036 int index = longarray[j];
1037 1037#ifdef LOADABLE_FONTS
1038 int offset_idx = 0;
1039 unsigned char uni_char[2];
1040#endif
1038 /* current or cached sector? */ 1041 /* current or cached sector? */
1039 if ( sectoridx >= SECTOR_SIZE ) { 1042 if ( sectoridx >= SECTOR_SIZE ) {
1040 if ( sectoridx >= SECTOR_SIZE*2 ) { 1043 if ( sectoridx >= SECTOR_SIZE*2 ) {
@@ -1052,16 +1055,39 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry)
1052 index &= SECTOR_SIZE-1; 1055 index &= SECTOR_SIZE-1;
1053 } 1056 }
1054 1057
1055 /* piece together the name subcomponents. 1058 /* piece together the name subcomponents. */
1056 names are stored in unicode, but we 1059#ifdef LOADABLE_FONTS
1057 only grab the low byte (iso8859-1). 1060 for (k=0; k<5; k++)
1058 */ 1061 {
1062 offset_idx = index + k*2 + 1;
1063 uni_char[0] = ptr[offset_idx+1];
1064 uni_char[1] = ptr[offset_idx];
1065 entry->name[l++] = from_unicode(uni_char);
1066 }
1067 for (k=0; k<6; k++)
1068 {
1069 offset_idx = index + k*2 + 14;
1070 uni_char[0] = ptr[offset_idx+1];
1071 uni_char[1] = ptr[offset_idx];
1072 entry->name[l++] = from_unicode(uni_char);
1073 }
1074 for (k=0; k<2; k++)
1075 {
1076 offset_idx = index + k*2 + 28;
1077 uni_char[0] = ptr[offset_idx+1];
1078 uni_char[1] = ptr[offset_idx];
1079 entry->name[l++] = from_unicode(uni_char);
1080 }
1081#else
1082 /* names are stored in unicode, but we
1083 only grab the low byte (iso8859-1). */
1059 for (k=0; k<5; k++) 1084 for (k=0; k<5; k++)
1060 entry->name[l++] = ptr[index + k*2 + 1]; 1085 entry->name[l++] = ptr[index + k*2 + 1];
1061 for (k=0; k<6; k++) 1086 for (k=0; k<6; k++)
1062 entry->name[l++] = ptr[index + k*2 + 14]; 1087 entry->name[l++] = ptr[index + k*2 + 14];
1063 for (k=0; k<2; k++) 1088 for (k=0; k<2; k++)
1064 entry->name[l++] = ptr[index + k*2 + 28]; 1089 entry->name[l++] = ptr[index + k*2 + 28];
1090#endif
1065 } 1091 }
1066 entry->name[l]=0; 1092 entry->name[l]=0;
1067 } 1093 }
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index a9cd8c65ac..806b812b82 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -27,6 +27,13 @@
27#include "debug.h" 27#include "debug.h"
28#include "system.h" 28#include "system.h"
29 29
30#ifdef LOADABLE_FONTS
31#include "ajf.h"
32#include "panic.h"
33#endif
34
35
36
30/*** definitions ***/ 37/*** definitions ***/
31 38
32#define LCDR (PBDR_ADDR+1) 39#define LCDR (PBDR_ADDR+1)
@@ -296,21 +303,21 @@ static void lcd_write(bool command, int byte)
296 PBDR &= ~LCD_CS; /* enable lcd chip select */ 303 PBDR &= ~LCD_CS; /* enable lcd chip select */
297 304
298 if ( command ) { 305 if ( command ) {
299 on=~(LCD_SD|LCD_SC|LCD_DS); 306 on=~(LCD_SD|LCD_SC|LCD_DS);
300 off=LCD_SC; 307 off=LCD_SC;
301 } 308 }
302 else { 309 else {
303 on=~(LCD_SD|LCD_SC); 310 on=~(LCD_SD|LCD_SC);
304 off=LCD_SC|LCD_DS; 311 off=LCD_SC|LCD_DS;
305 } 312 }
306 313
307 /* clock out each bit, MSB first */ 314 /* clock out each bit, MSB first */
308 for (i=0x80;i;i>>=1) 315 for (i=0x80;i;i>>=1)
309 { 316 {
310 PBDR &= on; 317 PBDR &= on;
311 if (i & byte) 318 if (i & byte)
312 PBDR |= LCD_SD; 319 PBDR |= LCD_SD;
313 PBDR |= off; 320 PBDR |= off;
314 } 321 }
315 322
316 PBDR |= LCD_CS; /* disable lcd chip select */ 323 PBDR |= LCD_CS; /* disable lcd chip select */
@@ -322,9 +329,9 @@ static void lcd_write(bool command, int byte)
322void lcd_backlight(bool on) 329void lcd_backlight(bool on)
323{ 330{
324 if ( on ) 331 if ( on )
325 PAIOR |= LCD_BL; 332 PAIOR |= LCD_BL;
326 else 333 else
327 PAIOR &= ~LCD_BL; 334 PAIOR &= ~LCD_BL;
328} 335}
329 336
330#endif /* SIMULATOR */ 337#endif /* SIMULATOR */
@@ -431,7 +438,7 @@ void lcd_define_pattern (int which,char *pattern,int length)
431 int i; 438 int i;
432 lcd_write(true,LCD_PRAM|which); 439 lcd_write(true,LCD_PRAM|which);
433 for (i=0;i<length;i++) 440 for (i=0;i<length;i++)
434 lcd_write(false,pattern[i]); 441 lcd_write(false,pattern[i]);
435} 442}
436 443
437void lcd_double_height(bool on) 444void lcd_double_height(bool on)
@@ -510,7 +517,9 @@ void lcd_init (void)
510{ 517{
511 create_thread(scroll_thread, scroll_stack, 518 create_thread(scroll_thread, scroll_stack,
512 sizeof(scroll_stack), scroll_name); 519 sizeof(scroll_stack), scroll_name);
513 520#if defined(LOADABLE_FONTS) && defined(SIMULATOR)
521 lcd_init_fonts();
522#endif
514 memset(icon_mirror, sizeof(icon_mirror), 0); 523 memset(icon_mirror, sizeof(icon_mirror), 0);
515} 524}
516#endif 525#endif
@@ -541,8 +550,8 @@ static int ymargin=0;
541 * This contains only the printable characters (0x20-0x7f). 550 * This contains only the printable characters (0x20-0x7f).
542 * Each element in this table is a character pattern bitmap. 551 * Each element in this table is a character pattern bitmap.
543 */ 552 */
544#define ASCII_MIN 0x20 /* First char in table */ 553#define ASCII_MIN 0x20 /* First char in table */
545#define ASCII_MAX 0x7f /* Last char in table */ 554#define ASCII_MAX 0x7f /* Last char in table */
546 555
547extern unsigned char char_gen_6x8[][5]; 556extern unsigned char char_gen_6x8[][5];
548extern unsigned char char_gen_8x12[][14]; 557extern unsigned char char_gen_8x12[][14];
@@ -550,9 +559,9 @@ extern unsigned char char_gen_12x16[][22];
550 559
551/* All zeros and ones bitmaps for area filling */ 560/* All zeros and ones bitmaps for area filling */
552static unsigned char zeros[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 561static unsigned char zeros[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
553 0x00, 0x00 }; 562 0x00, 0x00 };
554static unsigned char ones[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 563static unsigned char ones[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
555 0xff, 0xff }; 564 0xff, 0xff };
556static char fonts[] = { 6,8,12 }; 565static char fonts[] = { 6,8,12 };
557static char fontheight[] = { 8,12,16 }; 566static char fontheight[] = { 8,12,16 };
558 567
@@ -654,6 +663,101 @@ void lcd_setmargins(int x, int y)
654 ymargin = y; 663 ymargin = y;
655} 664}
656 665
666
667
668#ifdef LOADABLE_FONTS
669
670static unsigned char* _font = NULL;
671
672int lcd_init_fonts(void)
673{
674 if (!_font)
675 _font = ajf_read_font("/system.ajf");
676
677 if (!_font)
678 {
679 lcd_putsxy(0,0,"No font", 0);
680 return -1;
681 }
682
683 return 0;
684}
685
686void lcd_setldfont(unsigned char* f)
687{
688 _font = f;
689}
690
691unsigned char* lcd_getcurrentldfont()
692{
693 if (!_font)
694 panicf("No font loaded!");
695 return _font;
696}
697
698/*
699 * Return width and height of a string with a given font.
700 */
701int lcd_getstringsize(unsigned char *str, unsigned char* font, int *w, int *h)
702{
703 int width=0;
704 int height=0;
705 unsigned char ch;
706
707 if (!font)
708 panicf("No font specified");
709
710 while((ch = *str++))
711 {
712 int dw,dh;
713 ajf_get_charsize(ch, font, &dw, &dh);
714 if (dh>height)
715 height = dh;
716 width+=dw;
717 }
718 *w = width;
719 *h = height;
720
721 return width;
722}
723
724/*
725 * Put a string at specified bit position
726 */
727
728void lcd_putsldfxy(int x, int y, unsigned char *str)
729{
730 unsigned char ch;
731 int nx;
732 int ny=8;
733 int lcd_x = x;
734 int lcd_y = y;
735 if (!_font)
736 {
737 lcd_putsxy(0,0,"No font", 0);
738 return;
739 }
740 ny = (int)_font[2];
741 while (((ch = *str++) != '\0'))
742 {
743 unsigned char *char_buf = ajf_get_charbuf(ch, _font, &nx, &ny);
744 if (!char_buf)
745 {
746 char_buf = ajf_get_charbuf('?', _font, &nx, &ny);
747 if (!char_buf)
748 panicf("Bad font");
749 }
750 if(lcd_x + nx > LCD_WIDTH)
751 break;
752
753 lcd_clearrect (lcd_x, lcd_y, 1, ny);
754 lcd_bitmap (&char_buf[0], lcd_x, lcd_y, nx, ny, true);
755 lcd_x += nx+1;
756 }
757}
758#endif
759
760
657#ifdef LCD_PROPFONTS 761#ifdef LCD_PROPFONTS
658 762
659extern unsigned char char_dw_8x8_prop[][9]; 763extern unsigned char char_dw_8x8_prop[][9];
@@ -746,10 +850,19 @@ void lcd_puts(int x, int y, unsigned char *str)
746 ymargin = 8; 850 ymargin = 8;
747#endif 851#endif
748 852
853 if(!str || !str[0])
854 return;
855
749#ifdef LCD_PROPFONTS 856#ifdef LCD_PROPFONTS
750 lcd_putspropxy( xmargin + x*fonts[font], 857 lcd_putspropxy( xmargin + x*fonts[font],
751 ymargin + y*fontheight[font], 858 ymargin + y*fontheight[font],
752 str, font ); 859 str, font );
860#elif LOADABLE_FONTS
861 {
862 int w,h;
863 lcd_getstringsize(str,_font,&w,&h);
864 lcd_putsldfxy( xmargin + x*w/strlen(str), ymargin + y*h, str );
865 }
753#else 866#else
754 lcd_putsxy( xmargin + x*fonts[font], 867 lcd_putsxy( xmargin + x*fonts[font],
755 ymargin + y*fontheight[font], 868 ymargin + y*fontheight[font],
@@ -1105,25 +1218,31 @@ void lcd_puts_scroll(int x, int y, unsigned char* string )
1105 s->space = 11 - x; 1218 s->space = 11 - x;
1106#else 1219#else
1107 1220
1108#ifdef LCD_PROPFONTS 1221#if defined(LCD_PROPFONTS) || defined(LOADABLE_FONTS)
1109 unsigned char ch[2]; 1222 unsigned char ch[2];
1110 int w, h; 1223 int w, h;
1111#endif 1224#endif
1112 int width, height; 1225 int width, height;
1113 lcd_getfontsize(font, &width, &height); 1226 lcd_getfontsize(font, &width, &height);
1114#ifndef LCD_PROPFONTS 1227#if defined(LCD_PROPFONTS) || defined(LOADABLE_FONTS)
1115 s->space = (LCD_WIDTH - xmargin - x*width) / width;
1116#else
1117 ch[1] = 0; /* zero terminate */ 1228 ch[1] = 0; /* zero terminate */
1118 ch[0] = string[0]; 1229 ch[0] = string[0];
1119 width = 0; 1230 width = 0;
1120 for (s->space = 0; 1231 s->space = 0;
1121 ch[0] && 1232 while ( ch[0] &&
1122 (width + lcd_getstringsize(ch, 0, &w, &h) < (LCD_WIDTH - x*8)); 1233#ifdef LCD_PROPFONTS
1123 ) { 1234 (width + lcd_getstringsize(ch, 0, &w, &h) <
1235 (LCD_WIDTH - x*8))) {
1236#else
1237 (width + lcd_getstringsize(ch, _font, &w, &h) <
1238 (LCD_WIDTH - x*8))) {
1239#endif
1124 width += w; 1240 width += w;
1125 ch[0]=string[(int)++s->space]; 1241 s->space++;
1242 ch[0]=string[s->space];
1126 } 1243 }
1244#else
1245 s->space = (LCD_WIDTH - xmargin - x*width) / width;
1127#endif 1246#endif
1128#endif 1247#endif
1129 1248
@@ -1148,11 +1267,25 @@ void lcd_stop_scroll(void)
1148 scroll_count = 0; 1267 scroll_count = 0;
1149 1268
1150#ifdef LCD_PROPFONTS 1269#ifdef LCD_PROPFONTS
1270
1151 lcd_clearrect(xmargin + s->startx*fonts[font], 1271 lcd_clearrect(xmargin + s->startx*fonts[font],
1152 ymargin + s->starty*fontheight[font], 1272 ymargin + s->starty*fontheight[font],
1153 LCD_WIDTH - xmargin, 1273 LCD_WIDTH - xmargin,
1154 fontheight[font]); 1274 fontheight[font]);
1275
1276#elif defined(LOADABLE_FONTS)
1277 {
1278 int w,h;
1279 lcd_getstringsize( s->text, _font, &w, &h);
1280 lcd_clearrect(xmargin + s->startx*w/s->textlen,
1281 ymargin + s->starty*h,
1282 LCD_WIDTH - xmargin,
1283 h);
1284
1285 }
1155#endif 1286#endif
1287
1288
1156 /* restore scrolled row */ 1289 /* restore scrolled row */
1157 lcd_puts(s->startx,s->starty,s->text); 1290 lcd_puts(s->startx,s->starty,s->text);
1158 lcd_update(); 1291 lcd_update();
@@ -1208,6 +1341,15 @@ static void scroll_thread(void)
1208 ymargin + s->starty*fontheight[font], 1341 ymargin + s->starty*fontheight[font],
1209 LCD_WIDTH - xmargin, 1342 LCD_WIDTH - xmargin,
1210 fontheight[font]); 1343 fontheight[font]);
1344#elif defined(LOADABLE_FONTS)
1345 {
1346 int w,h;
1347 lcd_getstringsize( s->text, _font, &w, &h);
1348 lcd_clearrect(xmargin + s->startx*w/s->textlen,
1349 ymargin + s->starty*h,
1350 LCD_WIDTH - xmargin,
1351 h);
1352 }
1211#endif 1353#endif
1212 lcd_puts(s->startx,s->starty,s->line); 1354 lcd_puts(s->startx,s->starty,s->line);
1213 lcd_update(); 1355 lcd_update();
diff --git a/firmware/drivers/lcd.h b/firmware/drivers/lcd.h
index bc971dc117..ed2fe7ee45 100644
--- a/firmware/drivers/lcd.h
+++ b/firmware/drivers/lcd.h
@@ -105,4 +105,15 @@ extern void lcd_clearpixel(int x, int y);
105 105
106#endif /* CHARCELLS / BITMAP */ 106#endif /* CHARCELLS / BITMAP */
107 107
108#ifdef LOADABLE_FONTS
109extern int lcd_init_fonts(void);
110extern void lcd_putsldfxy(int x, int y, unsigned char *str);
111extern int lcd_getstringsize(unsigned char *str,
112 unsigned char* font,
113 int *w, int *h);
114extern void lcd_setldfont(unsigned char* f);
115
116extern unsigned char* lcd_getcurrentldfont(void);
117#endif
118
108#endif /* __LCD_H__ */ 119#endif /* __LCD_H__ */
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index efe7570bff..a85545efce 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -967,6 +967,7 @@ static void mpeg_thread(void)
967 967
968 case SYS_USB_CONNECTED: 968 case SYS_USB_CONNECTED:
969 stop_playing(); 969 stop_playing();
970#ifndef SIMULATOR
970 971
971 /* Tell the USB thread that we are safe */ 972 /* Tell the USB thread that we are safe */
972 DEBUGF("mpeg_thread got SYS_USB_CONNECTED\n"); 973 DEBUGF("mpeg_thread got SYS_USB_CONNECTED\n");
@@ -974,6 +975,7 @@ static void mpeg_thread(void)
974 975
975 /* Wait until the USB cable is extracted again */ 976 /* Wait until the USB cable is extracted again */
976 usb_wait_for_disconnect(&mpeg_queue); 977 usb_wait_for_disconnect(&mpeg_queue);
978#endif
977 break; 979 break;
978 } 980 }
979 } 981 }
diff --git a/firmware/panic.c b/firmware/panic.c
index f9023fe704..b130482495 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -8,7 +8,7 @@
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2002 by wavey@wavey.org 10 * Copyright (C) 2002 by wavey@wavey.org
11 * 11 *nn
12 * All files in this archive are subject to the GNU General Public License. 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. 13 * See the file COPYING in the source tree root for full license agreement.
14 * 14 *
@@ -48,8 +48,9 @@ void panicf( char *fmt, ...)
48 lcd_puts(0,0,panic_buf); 48 lcd_puts(0,0,panic_buf);
49#elif defined(HAVE_LCD_BITMAP) 49#elif defined(HAVE_LCD_BITMAP)
50 lcd_clear_display(); 50 lcd_clear_display();
51 lcd_puts(0,0,panic_buf); 51 lcd_putsxy(0,0,panic_buf,0);
52 lcd_update(); 52 lcd_update();
53
53#else 54#else
54 /* no LCD */ 55 /* no LCD */
55#endif 56#endif