[Taranis] Wider contrast adjustment range

This commit is contained in:
bernet.andre@gmail.com
2013-07-18 14:40:56 +00:00
parent 89c1962c5f
commit 566fc2344b
+4 -4
View File
@@ -13,7 +13,7 @@
#define WriteData(x) AspiData(x)
#define WriteCommand(x) AspiCmd(x)
#define CONTRAST_OFS 10
#define CONTRAST_OFS 8
static void LCD_Init()
{
@@ -21,7 +21,7 @@ static void LCD_Init()
AspiCmd(0x25); //Temperature compensation curve definition: 0x25 = -0.05%/oC
AspiCmd(0xEA); //set bias=1/10 :Command table NO.27
AspiCmd(0x81); //Set Vop
AspiCmd(g_eeGeneral.contrast+CONTRAST_OFS); //0--255
AspiCmd((g_eeGeneral.contrast-CONTRAST_OFS)*2); //0--255
AspiCmd(0xA6); //inverse display off
AspiCmd(0xD1); //SET RGB:Command table NO.21 .SET RGB or BGR. D1=RGB
AspiCmd(0xD5); //set color mode 4K and 12bits :Command table NO.22
@@ -52,7 +52,7 @@ static void lcdRefreshInit()
AspiCmd(0x25); //Temperature compensation curve definition: 0x25 = -0.05%/oC
AspiCmd(0xEA); //set bias=1/10 :Command table NO.27
AspiCmd(0x81); //Set Vop
AspiCmd(g_eeGeneral.contrast+CONTRAST_OFS); //0--255
AspiCmd((g_eeGeneral.contrast-CONTRAST_OFS)*2); //0--255
AspiCmd(0xA6); //inverse display off
AspiCmd(0xD1); //SET RGB:Command table NO.21 .SET RGB or BGR. D1=RGB
AspiCmd(0xD5); //set color mode 4K and 12bits :Command table NO.22
@@ -213,6 +213,6 @@ void lcdInit()
void lcdSetRefVolt(uint8_t val)
{
AspiCmd(0x81); //Set Vop
AspiCmd(val+CONTRAST_OFS); //0--255
AspiCmd((val-CONTRAST_OFS)*2); //0--255
}