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 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 HAVE_LCD_INVERT

View file

@ -109,14 +109,14 @@ void lcd_set_flip(bool yesno)
if (yesno)
{
lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 1);
lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 0);
lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x20, 0);
lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 1);
lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x1f, 1);
}
else
{
lcd_send_cmd(LCD_CNTL_COLUMN_ADDRESS_DIR | 0);
lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 1);
lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x20, 1);
lcd_send_cmd(LCD_CNTL_COMMON_OUTPUT_STATUS | 0);
lcd_write_reg_ex(LCD_CNTL_DUTY_SET, 0x1f, 0);
}
}