diff options
Diffstat (limited to 'firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 34 |
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; } |