summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-player.h9
-rw-r--r--firmware/export/lcd-charcell.h41
-rw-r--r--firmware/export/lcd-player-charset.h27
-rw-r--r--firmware/export/lcd.h63
4 files changed, 72 insertions, 68 deletions
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index ef5eedef79..e462ef2d8e 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -4,10 +4,11 @@
4/* define this if you would like tagcache to build on this target */ 4/* define this if you would like tagcache to build on this target */
5#define HAVE_TAGCACHE 5#define HAVE_TAGCACHE
6 6
7/* LCD dimensions (for the simulator) */ 7#define LCD_WIDTH 11
8#define LCD_WIDTH 132 /* Display width in pixels */ 8#define LCD_HEIGHT 2
9#define LCD_HEIGHT 64 /* Display height in pixels */ 9#define LCD_DEPTH 1
10#define LCD_DEPTH 1 10#define SIM_LCD_WIDTH 132 /* pixels */
11#define SIM_LCD_HEIGHT 64 /* pixels */
11 12
12/* define this if you have the Player's keyboard */ 13/* define this if you have the Player's keyboard */
13#define CONFIG_KEYPAD PLAYER_PAD 14#define CONFIG_KEYPAD PLAYER_PAD
diff --git a/firmware/export/lcd-charcell.h b/firmware/export/lcd-charcell.h
new file mode 100644
index 0000000000..2676056e63
--- /dev/null
+++ b/firmware/export/lcd-charcell.h
@@ -0,0 +1,41 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: lcd-player.c 12835 2007-03-18 17:58:49Z amiconn $
9 *
10 * Copyright (C) 2007 by Jens Arnold
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/* map unicode characters to hardware or extended lcd characters */
21struct xchar_info {
22 unsigned short ucs;
23 unsigned short glyph;
24 /* 0x0000..0x7fff: fixed extended characters
25 * 0x8000..0xffff: variable extended characters
26 * Dontcare if priority == 0 */
27 unsigned char priority;
28 unsigned char hw_char; /* direct or substitute */
29};
30
31/* target dependent - to be adjusted for other charcell targets */
32#define HW_PATTERN_SIZE 7 /* number of bytes per pattern */
33#define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */
34extern int hw_pattern_count; /* actual number of user-definable hw patterns */
35
36extern const struct xchar_info *xchar_info;
37extern int xchar_info_size; /* number of entries */
38extern const unsigned char xfont_fixed[][8];
39
40void lcd_charset_init(void);
41
diff --git a/firmware/export/lcd-player-charset.h b/firmware/export/lcd-player-charset.h
deleted file mode 100644
index c94fab8f3b..0000000000
--- a/firmware/export/lcd-player-charset.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2003 by Kjell Ericson
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#ifdef HAVE_LCD_CHARCELLS
20
21#define NO_EXTENDED_LCD_CHARS 0x5e
22#define RESERVED_CHAR 0xff
23#define LAST_RESERVED_CHAR 0x16
24#define NOCHAR_OLD 0x24
25#define NOCHAR_NEW 0x20
26
27#endif
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 1b7dbb4795..0d56389480 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -59,12 +59,21 @@ extern void lcd_init_device(void);
59extern void lcd_backlight(bool on); 59extern void lcd_backlight(bool on);
60extern int lcd_default_contrast(void); 60extern int lcd_default_contrast(void);
61extern void lcd_set_contrast(int val); 61extern void lcd_set_contrast(int val);
62extern void lcd_setmargins(int xmargin, int ymargin);
63extern int lcd_getxmargin(void);
64extern int lcd_getymargin(void);
65extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
62 66
63extern void lcd_clear_display(void); 67extern void lcd_clear_display(void);
68extern void lcd_putsxy(int x, int y, const unsigned char *string);
64extern void lcd_puts(int x, int y, const unsigned char *string); 69extern void lcd_puts(int x, int y, const unsigned char *string);
65extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); 70extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
66extern void lcd_putc(int x, int y, unsigned short ch); 71extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
72extern void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
73 int offset);
74extern void lcd_putc(int x, int y, unsigned long ucs);
67extern void lcd_stop_scroll(void); 75extern void lcd_stop_scroll(void);
76extern void lcd_bidir_scroll(int threshold);
68extern void lcd_scroll_speed(int speed); 77extern void lcd_scroll_speed(int speed);
69extern void lcd_scroll_delay(int ms); 78extern void lcd_scroll_delay(int ms);
70extern void lcd_puts_scroll(int x, int y, const unsigned char* string); 79extern void lcd_puts_scroll(int x, int y, const unsigned char* string);
@@ -123,14 +132,14 @@ enum
123 ICON_PARAM 132 ICON_PARAM
124}; 133};
125 134
126extern void lcd_double_height(bool on); 135void lcd_double_height(bool on);
127extern void lcd_define_hw_pattern(int which,const char *pattern,int length); 136void lcd_put_hw_char(int x, int y, unsigned char hw_char);
128extern void lcd_define_pattern(int which,const char *pattern); 137void lcd_define_hw_pattern(int which, const char *pattern);
129unsigned char lcd_get_locked_pattern(void); 138void lcd_define_pattern(unsigned long ucs, const char *pattern);
130void lcd_unlock_pattern(unsigned char pat); 139unsigned long lcd_get_locked_pattern(void);
131void lcd_put_cursor(int x, int y, char cursor_char); 140void lcd_unlock_pattern(unsigned long ucs);
141void lcd_put_cursor(int x, int y, unsigned long cursor_ucs);
132void lcd_remove_cursor(void); 142void lcd_remove_cursor(void);
133extern void lcd_bidir_scroll(int threshold);
134#define JUMP_SCROLL_ALWAYS 5 143#define JUMP_SCROLL_ALWAYS 5
135extern void lcd_jump_scroll(int mode); /* 0=off, 1=once, ..., ALWAYS */ 144extern void lcd_jump_scroll(int mode); /* 0=off, 1=once, ..., ALWAYS */
136extern void lcd_jump_scroll_delay(int ms); 145extern void lcd_jump_scroll_delay(int ms);
@@ -303,17 +312,10 @@ extern void lcd_set_flip(bool yesno);
303 312
304extern void lcd_set_drawmode(int mode); 313extern void lcd_set_drawmode(int mode);
305extern int lcd_get_drawmode(void); 314extern int lcd_get_drawmode(void);
306extern void lcd_setmargins(int xmargin, int ymargin);
307extern int lcd_getxmargin(void);
308extern int lcd_getymargin(void);
309extern void lcd_setfont(int font); 315extern void lcd_setfont(int font);
310extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
311 316
312extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
313extern void lcd_puts_style_offset(int x, int y, const unsigned char *str, 317extern void lcd_puts_style_offset(int x, int y, const unsigned char *str,
314 int style, int offset); 318 int style, int offset);
315extern void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
316 int offset);
317extern void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, 319extern void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string,
318 int style, int offset); 320 int style, int offset);
319 321
@@ -338,10 +340,8 @@ extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
338 int stride, int x, int y, int width, int height); 340 int stride, int x, int y, int width, int height);
339extern void lcd_bitmap(const fb_data *src, int x, int y, int width, 341extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
340 int height); 342 int height);
341extern void lcd_putsxy(int x, int y, const unsigned char *string);
342 343
343extern void lcd_invertscroll(int x, int y); 344extern void lcd_invertscroll(int x, int y);
344extern void lcd_bidir_scroll(int threshold);
345extern void lcd_scroll_step(int pixels); 345extern void lcd_scroll_step(int pixels);
346 346
347#if LCD_DEPTH > 1 347#if LCD_DEPTH > 1
@@ -380,36 +380,25 @@ extern void lcd_bitmap_transparent(const fb_data *src, int x, int y,
380#endif /* HAVE_LCD_BITMAP */ 380#endif /* HAVE_LCD_BITMAP */
381 381
382/* internal usage, but in multiple drivers */ 382/* internal usage, but in multiple drivers */
383#define SCROLL_SPACING 3
383#ifdef HAVE_LCD_BITMAP 384#ifdef HAVE_LCD_BITMAP
384#define SCROLL_SPACING 3 385#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2)
385#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2) 386#else
387#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH + SCROLL_SPACING + 2)
388#endif
386 389
387struct scrollinfo { 390struct scrollinfo {
388 char line[SCROLL_LINE_SIZE]; 391 char line[SCROLL_LINE_SIZE];
389 int len; /* length of line in chars */ 392 int len; /* length of line in chars */
390 int width; /* length of line in pixels */
391 int offset; 393 int offset;
392 int startx; 394 int startx;
395#ifdef HAVE_LCD_BITMAP
396 int width; /* length of line in pixels */
397 bool invert; /* invert the scrolled text */
398#endif
393 bool backward; /* scroll presently forward or backward? */ 399 bool backward; /* scroll presently forward or backward? */
394 bool bidir; 400 bool bidir;
395 bool invert; /* invert the scrolled text */
396 long start_tick; 401 long start_tick;
397}; 402};
398#else /* !HAVE_LCD_BITMAP */
399
400struct scrollinfo {
401 int mode;
402 char text[MAX_PATH];
403 int textlen;
404 int offset;
405 int turn_offset;
406 int startx;
407 int starty;
408 long scroll_start_tick;
409 int direction; /* +1 for right or -1 for left*/
410 int jump_scroll;
411 int jump_scroll_steps;
412};
413#endif
414 403
415#endif /* __LCD_H__ */ 404#endif /* __LCD_H__ */