summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-03-31 09:58:49 +0000
committerJens Arnold <amiconn@rockbox.org>2007-03-31 09:58:49 +0000
commit54ea2e435e1a5688de4e4dcf551a1fc9c1db323f (patch)
treee8ee4e55a20c872a6c0deff554734038c35dc661 /firmware/target
parent6186b556bdbe97bc3c50dd8feb970590bec2053c (diff)
downloadrockbox-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/target')
-rw-r--r--firmware/target/sh/archos/player/lcd-player.c38
1 files changed, 27 insertions, 11 deletions
diff --git a/firmware/target/sh/archos/player/lcd-player.c b/firmware/target/sh/archos/player/lcd-player.c
index 7018b2277a..8f59901116 100644
--- a/firmware/target/sh/archos/player/lcd-player.c
+++ b/firmware/target/sh/archos/player/lcd-player.c
@@ -23,6 +23,7 @@
#include "hwcompat.h"
#include "system.h"
#include "lcd.h"
+#include "lcd-charcell.h"
#define OLD_LCD_CRAM ((char)0xB0) /* Characters */
#define OLD_LCD_PRAM ((char)0x80) /* Patterns */
@@ -69,17 +70,6 @@ void lcd_double_height(bool on)
: NEW_LCD_SET_DOUBLE_HEIGHT);
}
-void lcd_put_hw_char(int x, int y, unsigned char hw_char)
-{
- lcd_write_command_e(LCD_CURSOR(x, y), hw_char);
-}
-
-void lcd_define_hw_pattern (int which, const char *pattern)
-{
- lcd_write_command(lcd_pram | (which << 3));
- lcd_write_data(pattern, 7);
-}
-
void lcd_icon(int icon, bool enable)
{
static const struct {
@@ -233,3 +223,29 @@ void lcd_init_device(void)
}
lcd_set_contrast(lcd_default_contrast());
}
+
+/*** Update functions ***/
+
+void lcd_update(void)
+{
+ int y;
+
+ for (y = 0; y < lcd_pattern_count; y++)
+ {
+ if (lcd_patterns[y].count > 0)
+ {
+ lcd_write_command(lcd_pram | (y << 3));
+ lcd_write_data(lcd_patterns[y].pattern, 7);
+ }
+ }
+ for (y = 0; y < LCD_HEIGHT; y++)
+ {
+ lcd_write_command(LCD_CURSOR(0, y));
+ lcd_write_data(lcd_charbuffer[y], LCD_WIDTH);
+ }
+ if (lcd_cursor.visible)
+ {
+ lcd_write_command_e(LCD_CURSOR(lcd_cursor.x, lcd_cursor.y),
+ lcd_cursor.hw_char);
+ }
+}