1
0
Fork 0
forked from len0rd/rockbox

Samsung YH-920: properly implement and enable lcd flipping.

Change-Id: I0a8609c9b4849332a97a125d186f339a61e4d584
This commit is contained in:
Szymon Dziok 2014-06-01 19:34:58 +00:00
parent f3edbd142a
commit 8326f173f9
2 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@
#define DEFAULT_CONTRAST_SETTING 61 /* Match boot contrast */ #define DEFAULT_CONTRAST_SETTING 61 /* Match boot contrast */
/* define this if you can flip your LCD */ /* define this if you can flip your LCD */
/* todo #define HAVE_LCD_FLIP */ #define HAVE_LCD_FLIP
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -106,17 +106,17 @@ void lcd_set_invert_display(bool yesno)
/* turn the display upside down (call lcd_update() afterwards) */ /* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno) void lcd_set_flip(bool yesno)
{ {
if (yesno) if (yesno)
{ {
lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 1); lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 1);
lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 0); lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 1);
lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x20, 0); lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x1f, 1);
} }
else else
{ {
lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 0); lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 0);
lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 1); lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 0);
lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x20, 1); lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x1f, 0);
} }
} }