Remove the calls to backlight_lcd_sleep_countdown from target specific code and move...
[kugel-rb.git] / firmware / export / lcd-charcell.h
blob1f61864f57f5f35379c81180b7784fb2429b16de
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Jens Arnold
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include "config.h"
24 /* target dependent - to be adjusted for other charcell targets */
25 #define HW_PATTERN_SIZE 7 /* number of bytes per pattern */
26 #define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */
28 struct cursor_info {
29 unsigned char hw_char;
30 unsigned char subst_char;
31 bool enabled;
32 bool visible;
33 int x;
34 int y;
35 int divider;
36 int downcount;
39 /* map unicode characters to hardware or extended lcd characters */
40 struct xchar_info {
41 unsigned short ucs;
42 unsigned short glyph;
43 /* 0x0000..0x7fff: fixed extended characters
44 * 0x8000..0xffff: variable extended characters
45 * Dontcare if priority == 0 */
46 unsigned char priority;
47 unsigned char hw_char; /* direct or substitute */
50 /* track usage of user-definable characters */
51 struct pattern_info {
52 short count;
53 unsigned short glyph;
54 unsigned char priority;
55 unsigned char pattern[HW_PATTERN_SIZE];
58 extern int lcd_pattern_count; /* actual number of user-definable hw patterns */
60 extern unsigned char lcd_charbuffer[LCD_HEIGHT][LCD_WIDTH];
61 extern struct pattern_info lcd_patterns[MAX_HW_PATTERNS];
62 extern struct cursor_info lcd_cursor;
64 extern const struct xchar_info *xchar_info;
65 extern int xchar_info_size; /* number of entries */
66 extern const unsigned char xfont_fixed[][HW_PATTERN_SIZE];
68 void lcd_charset_init(void);