summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s3c2440
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-12-16 23:40:39 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-12-16 23:40:39 +0000
commit95e6043d5e256df72c20db39c3be59a3ba977b19 (patch)
tree20a86cd626c43e92436459b6a408c4a13f4c21ef /firmware/target/arm/s3c2440
parent13b2f5381310bc4e58d34f8dac0c8b9bdbd736d2 (diff)
downloadrockbox-95e6043d5e256df72c20db39c3be59a3ba977b19.tar.gz
rockbox-95e6043d5e256df72c20db39c3be59a3ba977b19.tar.bz2
rockbox-95e6043d5e256df72c20db39c3be59a3ba977b19.zip
Convert remaining memframe LCDs that can be convert to common code.
Massage the way it interfaces a bit to make things more flexible. The chroma_buf scheme on Sansa Connect and Creative ZVx calling the lcd_write_yuv420_lines implementation in lcd-as-memframe.S with five params with a chroma buffer that the function can't use wouldn't work anyway so just have them use the stock implementation (really, how was that working?). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s3c2440')
-rw-r--r--firmware/target/arm/s3c2440/lcd-s3c2440.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/firmware/target/arm/s3c2440/lcd-s3c2440.c b/firmware/target/arm/s3c2440/lcd-s3c2440.c
index 06b67c7535..1631e350f3 100644
--- a/firmware/target/arm/s3c2440/lcd-s3c2440.c
+++ b/firmware/target/arm/s3c2440/lcd-s3c2440.c
@@ -24,8 +24,7 @@
#include "lcd.h"
#include "lcd-target.h"
-extern bool lcd_active(void);
-extern void lcd_set_active(bool active);
+extern bool lcd_on; /* lcd-memframe.c */
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
static bool lcd_powered = true;
@@ -242,6 +241,8 @@ void lcd_init_device(void)
#else
LCD_CTRL_clock(true);
#endif
+
+ lcd_on = true;
}
#if defined(HAVE_LCD_SLEEP)
@@ -262,9 +263,7 @@ void lcd_sleep(void)
if (lcd_powered)
{
/* "not powered" implies "disabled" */
- if (!lcd_active())
- lcd_enable(false);
-
+ lcd_enable(false);
LCD_SPI_powerdown();
}
}
@@ -284,7 +283,7 @@ static void LCD_SPI_powerup(void)
void lcd_enable(bool state)
{
- if (state == lcd_active())
+ if (state == lcd_on)
return;
if(state)
@@ -298,20 +297,21 @@ void lcd_enable(bool state)
sleep(HZ/5);
}
- lcd_set_active(true);
+ lcd_on = true;
lcd_update();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{
- lcd_set_active(false);
+ lcd_on = false;
}
}
#endif
#ifdef GIGABEAT_F
-void lcd_set_flip(bool yesno) {
- if (!lcd_active())
+void lcd_set_flip(bool yesno)
+{
+ if (!lcd_on)
return;
LCD_SPI_start();
@@ -331,8 +331,9 @@ int lcd_default_contrast(void)
return DEFAULT_CONTRAST_SETTING;
}
-void lcd_set_contrast(int val) {
- if (!lcd_active())
+void lcd_set_contrast(int val)
+{
+ if (!lcd_on)
return;
LCD_SPI_start();
@@ -340,8 +341,9 @@ void lcd_set_contrast(int val) {
LCD_SPI_stop();
}
-void lcd_set_invert_display(bool yesno) {
- if (!lcd_active())
+void lcd_set_invert_display(bool yesno)
+{
+ if (!lcd_on)
return;
LCD_SPI_start();