summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-03-24 00:35:53 +0000
committerJens Arnold <amiconn@rockbox.org>2008-03-24 00:35:53 +0000
commit68a21689aef3a81335456476d4d10860ef5bc6b3 (patch)
treea57b6c31e4edd13e178da276344d33b172796456 /firmware/target
parent99c0978faa94b0e2fabe5d06000a10c8d48e7a0c (diff)
downloadrockbox-68a21689aef3a81335456476d4d10860ef5bc6b3.tar.gz
rockbox-68a21689aef3a81335456476d4d10860ef5bc6b3.zip
Consistent naming scheme the various blit functions. * Removed lcd_blit_mono() for colour targets. Plugin API became incompatible, so sort, clean up & bump. * Implemented lcd_blit_mono() for M3.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16775 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c14
-rw-r--r--firmware/target/arm/ipod/lcd-color_nano.c16
-rw-r--r--firmware/target/arm/ipod/lcd-gray.c6
-rw-r--r--firmware/target/arm/ipod/video/lcd-video.c16
-rw-r--r--firmware/target/arm/iriver/h10/lcd-h10_20gb.c16
-rw-r--r--firmware/target/arm/iriver/h10/lcd-h10_5gb.c16
-rw-r--r--firmware/target/arm/olympus/mrobe-100/lcd-mr100.c6
-rw-r--r--firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c18
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c14
-rw-r--r--firmware/target/arm/sandisk/sansa-c200/lcd-c200.c16
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/lcd-e200.c14
-rw-r--r--firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c16
-rw-r--r--firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c18
-rw-r--r--firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c14
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c14
-rw-r--r--firmware/target/coldfire/iaudio/m3/lcd-m3.c66
-rw-r--r--firmware/target/coldfire/iaudio/m5/lcd-m5.c6
-rw-r--r--firmware/target/coldfire/iaudio/x5/lcd-x5.c17
-rw-r--r--firmware/target/coldfire/iriver/h100/lcd-h100.c6
-rw-r--r--firmware/target/coldfire/iriver/h300/lcd-h300.c17
-rw-r--r--firmware/target/sh/archos/lcd-archos-bitmap.c6
21 files changed, 112 insertions, 220 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
index b39ddbe77d..07258fa123 100644
--- a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
@@ -174,7 +174,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
/* Performance function to blit a YUV bitmap directly to the LCD */
/* For the Gigabeat - show it rotated */
/* So the LCD_WIDTH is now the height */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
@@ -235,18 +235,6 @@ void lcd_set_invert_display(bool yesno) {
// TODO:
}
-void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
- int height, int stride)
-{
- (void) data;
- (void) bx;
- (void) y;
- (void) bwidth;
- (void) height;
- (void) stride;
- //TODO:
-}
-
void lcd_set_flip(bool yesno) {
(void) yesno;
// TODO:
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c
index b18b7ee712..482622bf57 100644
--- a/firmware/target/arm/ipod/lcd-color_nano.c
+++ b/firmware/target/arm/ipod/lcd-color_nano.c
@@ -109,20 +109,6 @@ void lcd_init_device(void)
/*** 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,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
#define CSUB_X 2
#define CSUB_Y 2
@@ -155,7 +141,7 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
#define MAX_6BIT 0x3f
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/ipod/lcd-gray.c b/firmware/target/arm/ipod/lcd-gray.c
index b77d3eb7f6..e36a7efc1d 100644
--- a/firmware/target/arm/ipod/lcd-gray.c
+++ b/firmware/target/arm/ipod/lcd-gray.c
@@ -277,8 +277,8 @@ void lcd_mono_data(const unsigned char *data, int count);
/* Performance function that works with an external buffer
note that x, bwidtht and stride are in 8-pixel units! */
-void lcd_blit(const unsigned char* data, int bx, int y, int bwidth,
- int height, int stride)
+void lcd_blit_mono(const unsigned char *data, int bx, int y, int bwidth,
+ int height, int stride)
{
while (height--)
{
@@ -295,7 +295,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
/* Performance function that works with an external buffer
note that bx and bwidth are in 8-pixel units! */
-void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int bx, int y, int bwidth, int height, int stride)
{
while (height--)
diff --git a/firmware/target/arm/ipod/video/lcd-video.c b/firmware/target/arm/ipod/video/lcd-video.c
index 0829114289..d0c82e905c 100644
--- a/firmware/target/arm/ipod/video/lcd-video.c
+++ b/firmware/target/arm/ipod/video/lcd-video.c
@@ -247,20 +247,6 @@ void lcd_init_device(void)
/*** 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,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
/* Update a fraction of the display. */
void lcd_update_rect(int x, int y, int width, int height)
{
@@ -319,7 +305,7 @@ extern void lcd_write_yuv420_lines(unsigned char const * const src[3],
int stride);
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
index 892adffea9..2052be724c 100644
--- a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
+++ b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
@@ -381,20 +381,6 @@ void lcd_sleep(void)
/*** 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,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
void lcd_yuv_set_options(unsigned options)
{
lcd_yuv_options = options;
@@ -411,7 +397,7 @@ extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3],
int y_screen);
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c
index 8972fd1e9c..5b022e09c5 100644
--- a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c
+++ b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c
@@ -112,20 +112,6 @@ void lcd_init_device(void)
/*** 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,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
#define CSUB_X 2
#define CSUB_Y 2
@@ -141,7 +127,7 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
#define ROUNDOFFSG (63*257)
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
index c7977e63fc..9fb6790cc4 100644
--- a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
+++ b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c
@@ -118,8 +118,8 @@ void lcd_set_flip(bool yesno)
/* Performance function that works with an external buffer
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)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
/* TODO: Implement lcd_blit() */
(void)data;
@@ -132,7 +132,7 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
/* Performance function that works with an external buffer
note that by and bheight are in 4-pixel units! */
-void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
/* TODO: Implement lcd_grey_phase_blit() */
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c
index 0aacd8af67..39caf66b69 100644
--- a/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c
+++ b/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c
@@ -145,8 +145,8 @@ void lcd_init_device(void)
/* Performance function that works with an external buffer
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)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
/* Copy display bitmap to hardware */
while (bheight--)
@@ -161,6 +161,20 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
}
+/* Performance function that works with an external buffer
+ note that by and bheight are in 8-pixel units! */
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
+ int x, int by, int width, int bheight, int stride)
+{
+ (void)values;
+ (void)phases;
+ (void)x;
+ (void)by;
+ (void)width;
+ (void)bheight;
+ (void)stride;
+}
+
/* Update the display.
This must be called after all other LCD functions that change the display. */
void lcd_update(void) ICODE_ATTR;
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
index fc8822ba50..0d532f62c9 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
@@ -350,7 +350,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
/* Performance function to blit a YUV bitmap directly to the LCD */
/* For the Gigabeat - show it rotated */
/* So the LCD_WIDTH is now the height */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
@@ -411,18 +411,6 @@ void lcd_set_invert_display(bool yesno) {
// TODO:
}
-void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
- int height, int stride)
-{
- (void) data;
- (void) bx;
- (void) y;
- (void) bwidth;
- (void) height;
- (void) stride;
- //TODO:
-}
-
void lcd_set_flip(bool yesno) {
(void) yesno;
// TODO:
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c
index b17cce30fa..fed4119077 100644
--- a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c
+++ b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c
@@ -195,20 +195,6 @@ 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,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
void lcd_yuv_set_options(unsigned options)
{
lcd_yuv_options = options;
@@ -224,7 +210,7 @@ extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3],
int x_screen, /* To align dither pattern */
int y_screen);
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
index e1212c9512..f2689eabbf 100644
--- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
@@ -612,18 +612,6 @@ void lcd_set_flip(bool yesno)
/* Blitting functions */
-void lcd_blit(const fb_data* data, int x, int by, int width,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
void lcd_yuv_set_options(unsigned options)
{
lcd_yuv_options = options;
@@ -643,7 +631,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
/* Performance function to blit a YUV bitmap directly to the LCD */
/* For the e200 - show it rotated */
/* So the LCD_WIDTH is now the height */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c b/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c
index 53f32792c3..d563d55017 100644
--- a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c
+++ b/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c
@@ -51,22 +51,8 @@ void lcd_init_device(void)
/*** 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,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
-}
-
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c b/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c
index 973d4cb333..4101f6ab7d 100644
--- a/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c
+++ b/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c
@@ -190,8 +190,8 @@ void lcd_init_device(void)
/* Performance function that works with an external buffer
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)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
/* Copy display bitmap to hardware */
while (bheight--)
@@ -206,6 +206,20 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
}
+/* Performance function that works with an external buffer
+ note that by and bheight are in 8-pixel units! */
+void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases,
+ int x, int by, int width, int bheight, int stride)
+{
+ (void)values;
+ (void)phases;
+ (void)x;
+ (void)by;
+ (void)width;
+ (void)bheight;
+ (void)stride;
+}
+
/* Update the display.
This must be called after all other LCD functions that change the display. */
void lcd_update(void) ICODE_ATTR;
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
index 097dec31d3..54466f428b 100644
--- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
+++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
@@ -370,18 +370,6 @@ void lcd_set_invert_display(bool yesno)
(void)yesno;
}
-void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
- int height, int stride)
-{
- // TODO
- (void)data;
- (void)bx;
- (void)y;
- (void)bwidth;
- (void)height;
- (void)stride;
-}
-
void lcd_yuv_set_options(unsigned options)
{
lcd_yuv_options = options;
@@ -400,7 +388,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
int y_screen);
/* Performance function to blit a YUV bitmap directly to the LCD */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
index e4b36eb9be..241b82983c 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
@@ -163,7 +163,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst,
/* Performance function to blit a YUV bitmap directly to the LCD */
/* For the Gigabeat - show it rotated */
/* So the LCD_WIDTH is now the height */
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
@@ -210,18 +210,6 @@ void lcd_set_invert_display(bool yesno) {
// TODO:
}
-void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
- int height, int stride)
-{
- (void) data;
- (void) bx;
- (void) y;
- (void) bwidth;
- (void) height;
- (void) stride;
- //TODO:
-}
-
void lcd_set_flip(bool yesno) {
(void) yesno;
// TODO:
diff --git a/firmware/target/coldfire/iaudio/m3/lcd-m3.c b/firmware/target/coldfire/iaudio/m3/lcd-m3.c
index b1e81f91ba..ae72832a82 100644
--- a/firmware/target/coldfire/iaudio/m3/lcd-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/lcd-m3.c
@@ -289,6 +289,35 @@ void lcd_write_data(const fb_data *p_words, int count)
CS_HI;
}
+static void lcd_mono_data(const unsigned char *p_words, int count)
+{
+ unsigned data;
+ const unsigned char *p_bytes = p_words;
+ const unsigned char *p_end = p_words + count;
+
+ RS_HI;
+ CS_LO;
+ if (cpu_frequency < 50000000)
+ {
+ while (p_bytes < p_end)
+ {
+ data = *p_bytes++;
+ _write_fast(data);
+ _write_fast(data);
+ }
+ }
+ else
+ {
+ while (p_bytes < p_end)
+ {
+ data = *p_bytes++;
+ _write_byte(data);
+ _write_byte(data);
+ }
+ }
+ CS_HI;
+}
+
int lcd_default_contrast(void)
{
return DEFAULT_CONTRAST_SETTING;
@@ -341,7 +370,7 @@ void lcd_on(void)
lcd_write_command_e(LCD_SET_GRAY | 6, 0xcc);
lcd_write_command_e(LCD_SET_GRAY | 7, 0x0c);
- lcd_write_command(LCD_SET_PWM_FRC | 6); /* 4FRC + 12PWM */
+ lcd_write_command(LCD_SET_PWM_FRC | 6); /* 3FRC + 12PWM */
lcd_write_command(LCD_DISPLAY_ON | 1); /* display on */
@@ -428,24 +457,31 @@ void lcd_init_device(void)
#endif
}
-/* TODO: implement blit functions */
-
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
-void lcd_blit(const fb_data *data, int x, int by, int width,
- int bheight, int stride)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
+ if (initialized)
+ {
+ /* COM48-COM63 are not connected, so we need to skip those */
+ while (bheight--)
+ {
+ lcd_write_command(LCD_SET_PAGE | ((by > 5 ? by + 2 : by) & 0xf));
+ lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf);
+
+ lcd_mono_data(data, width);
+ data += stride;
+ by++;
+ }
+ }
}
+/* TODO: implement grey blit function */
+
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
-void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
(void)values;
@@ -463,7 +499,8 @@ void lcd_update(void) ICODE_ATTR;
void lcd_update(void)
{
int y;
- if(initialized) {
+ if (initialized)
+ {
for(y = 0;y < LCD_FBHEIGHT;y++) {
/* Copy display bitmap to hardware.
The COM48-COM63 lines are not connected so we have to skip
@@ -480,7 +517,8 @@ void lcd_update(void)
void lcd_update_rect(int, int, int, int) ICODE_ATTR;
void lcd_update_rect(int x, int y, int width, int height)
{
- if(initialized) {
+ if (initialized)
+ {
int ymax;
/* The Y coordinates have to work on even 8 pixel rows */
diff --git a/firmware/target/coldfire/iaudio/m5/lcd-m5.c b/firmware/target/coldfire/iaudio/m5/lcd-m5.c
index be9d5a39b8..71d49f544b 100644
--- a/firmware/target/coldfire/iaudio/m5/lcd-m5.c
+++ b/firmware/target/coldfire/iaudio/m5/lcd-m5.c
@@ -131,8 +131,8 @@ void lcd_init_device(void)
/* Performance function that works with an external buffer
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)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
const unsigned char *src, *src_end;
unsigned char *dst_u, *dst_l;
@@ -176,7 +176,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
/* Performance function that works with an external buffer
note that by and bheight are in 4-pixel units! */
-void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
stride <<= 2; /* 4 pixels per block */
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
index 5ca2cb508c..19faf0474d 100644
--- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
@@ -407,21 +407,6 @@ void lcd_sleep(void)
/*** update functions ***/
-/* Performance function that works with an external buffer
- note that by and bheight are in 8-pixel units! */
-void lcd_blit(const fb_data* data, int x, int by, int width,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
- /*if(display_on)*/
-}
-
/* Line write helper function for lcd_yuv_blit. Write two lines of yuv420.
* y should have two lines of Y back to back, 2nd line first.
* c should contain the Cb and Cr data for the two lines of Y back to back.
@@ -434,7 +419,7 @@ extern void lcd_write_yuv420_lines(const unsigned char *y,
* src_x, src_y, width and height should be even and within the LCD's
* boundaries.
*/
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/coldfire/iriver/h100/lcd-h100.c b/firmware/target/coldfire/iriver/h100/lcd-h100.c
index 2ba19255da..fd22df81ef 100644
--- a/firmware/target/coldfire/iriver/h100/lcd-h100.c
+++ b/firmware/target/coldfire/iriver/h100/lcd-h100.c
@@ -140,8 +140,8 @@ void lcd_init_device(void)
/* Performance function that works with an external buffer
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)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
const unsigned char *src, *src_end;
unsigned char *dst_u, *dst_l;
@@ -185,7 +185,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
/* Performance function that works with an external buffer
note that by and bheight are in 4-pixel units! */
-void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
stride <<= 2; /* 4 pixels per block */
diff --git a/firmware/target/coldfire/iriver/h300/lcd-h300.c b/firmware/target/coldfire/iriver/h300/lcd-h300.c
index 00662e16f9..5081366d41 100644
--- a/firmware/target/coldfire/iriver/h300/lcd-h300.c
+++ b/firmware/target/coldfire/iriver/h300/lcd-h300.c
@@ -294,21 +294,6 @@ bool lcd_enabled(void)
/*** update functions ***/
-/* Performance function that works with an external buffer
- note that by and bheight are in 8-pixel units! */
-void lcd_blit(const fb_data* data, int x, int by, int width,
- int bheight, int stride)
-{
- /* TODO: Implement lcd_blit() */
- (void)data;
- (void)x;
- (void)by;
- (void)width;
- (void)bheight;
- (void)stride;
- /*if(display_on)*/
-}
-
/* Line write helper function for lcd_yuv_blit. Write two lines of yuv420.
* y should have two lines of Y back to back, 2nd line first.
* c should contain the Cb and Cr data for the two lines of Y back to back.
@@ -321,7 +306,7 @@ extern void lcd_write_yuv420_lines(const unsigned char *y,
* src_x, src_y, width and height should be even
* x, y, width and height have to be within LCD bounds
*/
-void lcd_yuv_blit(unsigned char * const src[3],
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
diff --git a/firmware/target/sh/archos/lcd-archos-bitmap.c b/firmware/target/sh/archos/lcd-archos-bitmap.c
index 18d48f4ead..bc17bd3950 100644
--- a/firmware/target/sh/archos/lcd-archos-bitmap.c
+++ b/firmware/target/sh/archos/lcd-archos-bitmap.c
@@ -140,8 +140,8 @@ void lcd_init_device(void)
/* Performance function that works with an external buffer
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)
+void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
+ int bheight, int stride)
{
/* Copy display bitmap to hardware */
while (bheight--)
@@ -160,7 +160,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
-void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
+void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
stride <<= 3; /* 8 pixels per block */