LCD Adjustment for TARANIS
This commit is contained in:
@@ -411,7 +411,11 @@ void menuGeneralSetup(uint8_t event)
|
||||
lcd_putsLeft(y, STR_CONTRAST);
|
||||
lcd_outdezAtt(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.contrast, attr|LEFT);
|
||||
if(attr) {
|
||||
#if defined(PCBTARANIS)
|
||||
CHECK_INCDEC_GENVAR(event, g_eeGeneral.contrast, 0, 45);
|
||||
#else
|
||||
CHECK_INCDEC_GENVAR(event, g_eeGeneral.contrast, 10, 45);
|
||||
#endif
|
||||
lcdSetContrast();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#define WriteData(x) AspiData(x)
|
||||
#define WriteCommand(x) AspiCmd(x)
|
||||
#define CONTRAST_OFS 8
|
||||
#define CONTRAST_OFS 5
|
||||
|
||||
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)*2); //0--255
|
||||
AspiCmd(g_eeGeneral.contrast+CONTRAST_OFS); //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)*2); //0--255
|
||||
AspiCmd(g_eeGeneral.contrast+CONTRAST_OFS); //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
|
||||
@@ -211,6 +211,6 @@ void lcdInit()
|
||||
void lcdSetRefVolt(uint8_t val)
|
||||
{
|
||||
AspiCmd(0x81); //Set Vop
|
||||
AspiCmd((val-CONTRAST_OFS)*2); //0--255
|
||||
AspiCmd(val+CONTRAST_OFS); //0--255
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user