summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2014-06-01 19:34:58 +0000
committerSzymon Dziok <b0hoon@o2.pl>2014-06-09 01:15:17 +0000
commit8326f173f99ed8d37f97375bb380e5575267ee42 (patch)
tree0deb02c39a29bad80d689f77ad37d5bce7e2873d
parentf3edbd142ac3add921c45ad82efdf8656467f550 (diff)
downloadrockbox-8326f173f99ed8d37f97375bb380e5575267ee42.tar.gz
rockbox-8326f173f99ed8d37f97375bb380e5575267ee42.zip
Samsung YH-920: properly implement and enable lcd flipping.
Change-Id: I0a8609c9b4849332a97a125d186f339a61e4d584
-rw-r--r--firmware/export/config/samsungyh920.h2
-rw-r--r--firmware/target/arm/samsung/yh920/lcd-yh920.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/firmware/export/config/samsungyh920.h b/firmware/export/config/samsungyh920.h
index 58a8c835e3..4837942eed 100644
--- a/firmware/export/config/samsungyh920.h
+++ b/firmware/export/config/samsungyh920.h
@@ -64,7 +64,7 @@
64#define DEFAULT_CONTRAST_SETTING 61 /* Match boot contrast */ 64#define DEFAULT_CONTRAST_SETTING 61 /* Match boot contrast */
65 65
66/* define this if you can flip your LCD */ 66/* define this if you can flip your LCD */
67/* todo #define HAVE_LCD_FLIP */ 67#define HAVE_LCD_FLIP
68 68
69/* define this if you can invert the colours on your LCD */ 69/* define this if you can invert the colours on your LCD */
70#define HAVE_LCD_INVERT 70#define HAVE_LCD_INVERT
diff --git a/firmware/target/arm/samsung/yh920/lcd-yh920.c b/firmware/target/arm/samsung/yh920/lcd-yh920.c
index 5563c13f53..06aa3d718d 100644
--- a/firmware/target/arm/samsung/yh920/lcd-yh920.c
+++ b/firmware/target/arm/samsung/yh920/lcd-yh920.c
@@ -106,17 +106,17 @@ void lcd_set_invert_display(bool yesno)
106/* turn the display upside down (call lcd_update() afterwards) */ 106/* turn the display upside down (call lcd_update() afterwards) */
107void lcd_set_flip(bool yesno) 107void lcd_set_flip(bool yesno)
108{ 108{
109 if (yesno) 109 if (yesno)
110 { 110 {
111 lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 1); 111 lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 1);
112 lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 0); 112 lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 1);
113 lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x20, 0); 113 lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x1f, 1);
114 } 114 }
115 else 115 else
116 { 116 {
117 lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 0); 117 lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 0);
118 lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 1); 118 lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 0);
119 lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x20, 1); 119 lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x1f, 0);
120 } 120 }
121} 121}
122 122