diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-03-31 09:58:49 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-03-31 09:58:49 +0000 |
commit | 54ea2e435e1a5688de4e4dcf551a1fc9c1db323f (patch) | |
tree | e8ee4e55a20c872a6c0deff554734038c35dc661 /firmware/export | |
parent | 6186b556bdbe97bc3c50dd8feb970590bec2053c (diff) | |
download | rockbox-54ea2e435e1a5688de4e4dcf551a1fc9c1db323f.tar.gz rockbox-54ea2e435e1a5688de4e4dcf551a1fc9c1db323f.zip |
Charcell lcd driver: Preparations for switching to non-immediate LCD updates, using lcd_update() like on bitmap targets. * Added proper clipping. * Simplified simulator code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12979 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/lcd-charcell.h | 30 | ||||
-rw-r--r-- | firmware/export/lcd.h | 12 |
2 files changed, 29 insertions, 13 deletions
diff --git a/firmware/export/lcd-charcell.h b/firmware/export/lcd-charcell.h index 9a93cf19de..0684f9cd7b 100644 --- a/firmware/export/lcd-charcell.h +++ b/firmware/export/lcd-charcell.h | |||
@@ -17,6 +17,20 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | /* target dependent - to be adjusted for other charcell targets */ | ||
21 | #define HW_PATTERN_SIZE 7 /* number of bytes per pattern */ | ||
22 | #define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */ | ||
23 | |||
24 | struct cursor_info { | ||
25 | unsigned char hw_char; | ||
26 | bool enabled; | ||
27 | bool visible; | ||
28 | int x; | ||
29 | int y; | ||
30 | int divider; | ||
31 | int downcount; | ||
32 | }; | ||
33 | |||
20 | /* map unicode characters to hardware or extended lcd characters */ | 34 | /* map unicode characters to hardware or extended lcd characters */ |
21 | struct xchar_info { | 35 | struct xchar_info { |
22 | unsigned short ucs; | 36 | unsigned short ucs; |
@@ -28,10 +42,18 @@ struct xchar_info { | |||
28 | unsigned char hw_char; /* direct or substitute */ | 42 | unsigned char hw_char; /* direct or substitute */ |
29 | }; | 43 | }; |
30 | 44 | ||
31 | /* target dependent - to be adjusted for other charcell targets */ | 45 | /* track usage of user-definable characters */ |
32 | #define HW_PATTERN_SIZE 7 /* number of bytes per pattern */ | 46 | struct pattern_info { |
33 | #define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */ | 47 | short count; |
34 | extern int hw_pattern_count; /* actual number of user-definable hw patterns */ | 48 | unsigned short xchar; |
49 | unsigned char pattern[HW_PATTERN_SIZE]; | ||
50 | }; | ||
51 | |||
52 | extern int lcd_pattern_count; /* actual number of user-definable hw patterns */ | ||
53 | |||
54 | extern unsigned char lcd_charbuffer[LCD_HEIGHT][LCD_WIDTH]; | ||
55 | extern struct pattern_info lcd_patterns[MAX_HW_PATTERNS]; | ||
56 | extern struct cursor_info lcd_cursor; | ||
35 | 57 | ||
36 | extern const struct xchar_info *xchar_info; | 58 | extern const struct xchar_info *xchar_info; |
37 | extern int xchar_info_size; /* number of entries */ | 59 | extern int xchar_info_size; /* number of entries */ |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 48de53ada3..68f0961a5c 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -64,6 +64,7 @@ extern int lcd_getxmargin(void); | |||
64 | extern int lcd_getymargin(void); | 64 | extern int lcd_getymargin(void); |
65 | extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); | 65 | extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); |
66 | 66 | ||
67 | extern void lcd_update(void); | ||
67 | extern void lcd_clear_display(void); | 68 | extern void lcd_clear_display(void); |
68 | extern void lcd_putsxy(int x, int y, const unsigned char *string); | 69 | extern void lcd_putsxy(int x, int y, const unsigned char *string); |
69 | extern void lcd_puts(int x, int y, const unsigned char *string); | 70 | extern void lcd_puts(int x, int y, const unsigned char *string); |
@@ -79,7 +80,6 @@ extern void lcd_scroll_delay(int ms); | |||
79 | extern void lcd_puts_scroll(int x, int y, const unsigned char* string); | 80 | extern void lcd_puts_scroll(int x, int y, const unsigned char* string); |
80 | extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, | 81 | extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, |
81 | int style); | 82 | int style); |
82 | extern void lcd_icon(int icon, bool enable); | ||
83 | 83 | ||
84 | #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) | 84 | #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) |
85 | extern void lcd_yuv_blit(unsigned char * const src[3], | 85 | extern void lcd_yuv_blit(unsigned char * const src[3], |
@@ -87,12 +87,11 @@ extern void lcd_yuv_blit(unsigned char * const src[3], | |||
87 | int x, int y, int width, int height); | 87 | int x, int y, int width, int height); |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | #if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP) | 90 | #ifdef HAVE_LCD_BITMAP |
91 | /* performance function */ | 91 | /* performance function */ |
92 | extern void lcd_blit(const fb_data* data, int x, int by, int width, | 92 | extern void lcd_blit(const fb_data* data, int x, int by, int width, |
93 | int bheight, int stride); | 93 | int bheight, int stride); |
94 | 94 | ||
95 | extern void lcd_update(void); | ||
96 | /* update a fraction of the screen */ | 95 | /* update a fraction of the screen */ |
97 | extern void lcd_update_rect(int x, int y, int width, int height); | 96 | extern void lcd_update_rect(int x, int y, int width, int height); |
98 | 97 | ||
@@ -101,10 +100,6 @@ extern void lcd_remote_update(void); | |||
101 | /* update a fraction of the screen */ | 100 | /* update a fraction of the screen */ |
102 | extern void lcd_remote_update_rect(int x, int y, int width, int height); | 101 | extern void lcd_remote_update_rect(int x, int y, int width, int height); |
103 | #endif | 102 | #endif |
104 | |||
105 | #else | ||
106 | #define lcd_update() | ||
107 | #define lcd_update_rect(x,y,w,h) | ||
108 | #endif | 103 | #endif |
109 | 104 | ||
110 | #ifdef HAVE_LCD_CHARCELLS | 105 | #ifdef HAVE_LCD_CHARCELLS |
@@ -132,9 +127,8 @@ enum | |||
132 | ICON_PARAM | 127 | ICON_PARAM |
133 | }; | 128 | }; |
134 | 129 | ||
130 | void lcd_icon(int icon, bool enable); | ||
135 | void lcd_double_height(bool on); | 131 | void lcd_double_height(bool on); |
136 | void lcd_put_hw_char(int x, int y, unsigned char hw_char); | ||
137 | void lcd_define_hw_pattern(int which, const char *pattern); | ||
138 | void lcd_define_pattern(unsigned long ucs, const char *pattern); | 132 | void lcd_define_pattern(unsigned long ucs, const char *pattern); |
139 | unsigned long lcd_get_locked_pattern(void); | 133 | unsigned long lcd_get_locked_pattern(void); |
140 | void lcd_unlock_pattern(unsigned long ucs); | 134 | void lcd_unlock_pattern(unsigned long ucs); |