summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-e200v2
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-01-06 23:41:36 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-01-06 23:41:36 +0000
commit57667c51cf09de052222484ce94fbd6da113a55c (patch)
treeb85872be9b6c204e7d66a9203a64d78c524a38a5 /firmware/target/arm/as3525/sansa-e200v2
parent8e8e2627b27b28a855881db09f2c16bfb2193050 (diff)
Sansa AMS: refactor DBOP button reading (e200v2/Fuze/c200v2)
This gets rid of LCD glitches on Sansa Fuze, and now LCD transfers can get interrupted by button reading Flyspray: FS #10603 Author: Bertrik Sikken git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-e200v2')
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index 79914e2e44..0d990dc538 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -26,6 +26,7 @@
#include "debug.h"
#include "system.h"
#include "clock-target.h"
+#include "dbop-as3525.h"
/* The controller is unknown, but some registers appear to be the same as the
HD66789R */
@@ -89,8 +90,6 @@ static unsigned short r_entry_mode = R_ENTRY_MODE_HORZ_NORMAL;
#define R_DISP_CONTROL_REV 0x0000
static unsigned short r_disp_control_rev = R_DISP_CONTROL_NORMAL;
-static volatile bool lcd_busy = false;
-
static inline void lcd_delay(int x)
{
do {
@@ -435,8 +434,6 @@ void lcd_blit_yuv(unsigned char * const src[3],
yuv_src[1] = src[1] + (z >> 2) + (src_x >> 1);
yuv_src[2] = src[2] + (yuv_src[1] - src[1]);
- lcd_busy = true;
-
lcd_write_reg(R_ENTRY_MODE,
display_flipped ? R_ENTRY_MODE_VIDEO_FLIPPED : R_ENTRY_MODE_VIDEO_NORMAL
);
@@ -473,8 +470,6 @@ void lcd_blit_yuv(unsigned char * const src[3],
}
while (--height > 0);
}
-
- lcd_busy = false;
}
/* Update the display.
@@ -484,8 +479,6 @@ void lcd_update(void)
if (!display_on)
return;
- lcd_busy = true;
-
lcd_write_reg(R_ENTRY_MODE, r_entry_mode);
/* Set start position and window */
@@ -494,8 +487,6 @@ void lcd_update(void)
lcd_write_cmd(R_WRITE_DATA_2_GRAM);
lcd_write_data((fb_data*)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT);
-
- lcd_busy = false;
}
/* Update a fraction of the display. */
@@ -525,8 +516,6 @@ void lcd_update_rect(int x, int y, int width, int height)
if (y >= ymax)
return; /* nothing left to do */
- lcd_busy = true;
-
lcd_write_reg(R_ENTRY_MODE, r_entry_mode);
lcd_window(x, y, xmax, ymax);
@@ -541,25 +530,4 @@ void lcd_update_rect(int x, int y, int width, int height)
ptr += LCD_WIDTH;
}
while (--height >= 0);
-
- lcd_busy = false;
-}
-
-/* writes one red pixel outside the visible area, needed for correct
- * dbop reads */
-bool lcd_button_support(void)
-{
- if (lcd_busy)
- return false;
-
- lcd_write_reg(R_ENTRY_MODE, r_entry_mode);
-
- /* Set start position and window */
- lcd_window(LCD_WIDTH+1, LCD_HEIGHT+1, LCD_WIDTH+2, LCD_HEIGHT+2);
-
- lcd_write_cmd(R_WRITE_DATA_2_GRAM);
-
- lcd_write_value16(0xf<<12);
-
- return true;
}