summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
diff options
context:
space:
mode:
authorMark Arigo <markarigo@gmail.com>2008-01-09 20:07:42 +0000
committerMark Arigo <markarigo@gmail.com>2008-01-09 20:07:42 +0000
commit2e69ec6aa76e37a7ba0c977460c6838648cd4eb1 (patch)
treed6f8b7b03677a8240874b4ef3d8a180dac32a32e /firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
parent7152bce7de59f4dfb93389e8408398e0ad495c10 (diff)
downloadrockbox-2e69ec6aa76e37a7ba0c977460c6838648cd4eb1.tar.gz
rockbox-2e69ec6aa76e37a7ba0c977460c6838648cd4eb1.zip
m:robe 100 fixes: (1) add missing keymap (copied from H10), (2) rename lcd_yuv_blit to lcd_grey_phase_blit (since lcd is mono), and (3) update firmware/FILES for the new target. The bootloader and target builds should compile now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16037 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-100/lcd-mr100.c')
-rw-r--r--firmware/target/arm/olympus/mrobe-100/lcd-mr100.c131
1 files changed, 65 insertions, 66 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
index 501a0942e5..bf751f47a9 100644
--- a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
+++ b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
@@ -21,48 +21,48 @@
#include "lcd.h"
#include "kernel.h"
#include "system.h"
-
-/* send LCD data */
-static void lcd_send_data(unsigned data)
-{
+
+/* send LCD data */
+static void lcd_send_data(unsigned data)
+{
while (LCD1_CONTROL & LCD1_BUSY_MASK); /* wait for LCD */
- LCD1_DATA = data;
-}
-
-/* send LCD command */
-static void lcd_send_command(unsigned cmd)
-{
- while (LCD1_CONTROL & LCD1_BUSY_MASK); /* wait for LCD */
- LCD1_CMD = cmd;
-}
-
-/* LCD init */
-void lcd_init_device(void)
-{
- int i;
-
+ LCD1_DATA = data;
+}
+
+/* send LCD command */
+static void lcd_send_command(unsigned cmd)
+{
+ while (LCD1_CONTROL & LCD1_BUSY_MASK); /* wait for LCD */
+ LCD1_CMD = cmd;
+}
+
+/* LCD init */
+void lcd_init_device(void)
+{
+ int i;
+
DEV_INIT1 &= ~0xfc000000;
i = DEV_INIT1;
DEV_INIT1 = i;
- DEV_INIT2 &= ~0x400;
+ DEV_INIT2 &= ~0x400;
udelay(10000);
-
+
LCD1_CONTROL &= ~0x4;
udelay(15);
LCD1_CONTROL |= 0x4;
udelay(10);
- LCD1_CONTROL = 0x690;
+ LCD1_CONTROL = 0x690;
LCD1_CONTROL = 0x694;
-
- /* OF just reads these */
- i = LCD1_CONTROL;
- i = inl(0x70003004);
- i = LCD1_CMD;
- i = inl(0x7000300c);
+
+ /* OF just reads these */
+ i = LCD1_CONTROL;
+ i = inl(0x70003004);
+ i = LCD1_CMD;
+ i = inl(0x7000300c);
#if 0
/* this is skipped in the OF */
@@ -70,30 +70,30 @@ void lcd_init_device(void)
LCD1_CONTROL &= ~0x800;
LCD1_CONTROL &= ~0x400;
#endif
-
- LCD1_CONTROL |= 0x1;
- udelay(15000);
-
- lcd_send_command(0xe2);
- lcd_send_command(0x2f);
- lcd_send_command(0x26);
- lcd_send_command(0xcc);
- lcd_send_command(0xe8);
- lcd_send_command(0x81);
- lcd_send_command(0);
- lcd_send_command(0x40);
- lcd_send_command(0xa6);
- lcd_send_command(0x88);
- lcd_send_command(0xb0);
- lcd_send_command(0x10);
- lcd_send_command(0);
-}
+
+ LCD1_CONTROL |= 0x1;
+ udelay(15000);
+
+ lcd_send_command(0xe2);
+ lcd_send_command(0x2f);
+ lcd_send_command(0x26);
+ lcd_send_command(0xcc);
+ lcd_send_command(0xe8);
+ lcd_send_command(0x81);
+ lcd_send_command(0);
+ lcd_send_command(0x40);
+ lcd_send_command(0xa6);
+ lcd_send_command(0x88);
+ lcd_send_command(0xb0);
+ lcd_send_command(0x10);
+ lcd_send_command(0);
+}
/*** hardware configuration ***/
-int lcd_default_contrast(void)
-{
- return DEFAULT_CONTRAST_SETTING;
-}
+int lcd_default_contrast(void)
+{
+ return DEFAULT_CONTRAST_SETTING;
+}
void lcd_set_contrast(int val)
{
@@ -117,8 +117,8 @@ void lcd_set_flip(bool yesno)
/*** update functions ***/
/* Performance function that works with an external buffer
- note that by and bheight are in 4-pixel units! */
-void lcd_blit(const fb_data* data, int x, int by, int width,
+ note that by and bheight are in 8-pixel units! */
+void lcd_blit(const unsigned char* data, int x, int by, int width,
int bheight, int stride)
{
/* TODO: Implement lcd_blit() */
@@ -130,19 +130,18 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
(void)stride;
}
-/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
- int src_x, int src_y, int stride,
- int x, int y, int width, int height)
+/* Performance function that works with an external buffer
+ note that by and bheight are in 4-pixel units! */
+void lcd_grey_phase_blit(const struct grey_data *data, int x, int by,
+ int width, int bheight, int stride)
{
- (void)src;
- (void)src_x;
- (void)src_y;
- (void)stride;
+ /* TODO: Implement lcd_grey_phase_blit() */
+ (void)data;
(void)x;
- (void)y;
+ (void)by;
(void)width;
- (void)height;
+ (void)bheight;
+ (void)stride;
}
/* Update the display.
@@ -151,9 +150,9 @@ void lcd_update(void)
{
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
}
-
-/* Update a fraction of the display. */
-void lcd_update_rect(int x0, int y0, int width, int height)
+
+/* Update a fraction of the display. */
+void lcd_update_rect(int x0, int y0, int width, int height)
{
unsigned char *addr;
unsigned int cmd0, cmd1, cmd2;
@@ -189,4 +188,4 @@ void lcd_update_rect(int x0, int y0, int width, int height)
}
lcd_send_command(0xaf);
-}
+}