Skip to content

Commit da99792

Browse files
committed
Fri 11 Oct 2019 06:59:27 EDT
1 parent 9d46145 commit da99792

File tree

3 files changed

+42
-12
lines changed

3 files changed

+42
-12
lines changed

Components/super-go-play/odroid-go-common/components/odroid/odroid_display.c

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ DRAM_ATTR static const ili_init_cmd_t ili_sleep_cmds[] = {
9696
};
9797

9898

99-
// 2.4" LCD
99+
/*
100+
CONFIG_LCD_DRIVER_CHIP_ODROID_GO
101+
*/
102+
#ifdef CONFIG_LCD_DRIVER_CHIP_ODROID_GO
100103
DRAM_ATTR static const ili_init_cmd_t ili_init_cmds[] = {
101104
// VCI=2.8V
102105
//************* Start Initial Sequence **********//
@@ -114,7 +117,7 @@ DRAM_ATTR static const ili_init_cmd_t ili_init_cmds[] = {
114117
//{0x36, {(MADCTL_MV | MADCTL_MX | TFT_RGB_BGR)}, 1}, // Memory Access Control
115118
{0x36, {(MADCTL_MV | MADCTL_MY | TFT_RGB_BGR)}, 1}, // Memory Access Control
116119
{0x3A, {0x55}, 1},
117-
{0xB1, {0x00, 0x10}, 2}, // Frame Rate Control (1B=70, 1F=61, 10=119)
120+
{0xB1, {0x00, 0x1B}, 2}, // Frame Rate Control (1B=70, 1F=61, 10=119)
118121
{0xB6, {0x0A, 0xA2}, 2}, // Display Function Control
119122
{0xF6, {0x01, 0x30}, 2},
120123
{0xF2, {0x00}, 1}, // 3Gamma Function Disable
@@ -124,23 +127,50 @@ DRAM_ATTR static const ili_init_cmd_t ili_init_cmds[] = {
124127
{0xE0, {0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00}, 15},
125128
{0XE1, {0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F}, 15},
126129

130+
{0x11, {0}, 0x80}, //Exit Sleep
131+
{0x29, {0}, 0x80}, //Display on
132+
133+
{0, {0}, 0xff}
134+
};
135+
#endif
127136
/*
128-
// LUT
129-
{0x2d, {0x01, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1f,
130-
0x21, 0x23, 0x25, 0x27, 0x29, 0x2b, 0x2d, 0x2f, 0x31, 0x33, 0x35, 0x37, 0x39, 0x3b, 0x3d, 0x3f,
131-
0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
132-
0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c,
133-
0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x26, 0x27, 0x28, 0x29, 0x2a,
134-
0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
135-
0x00, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x12, 0x14, 0x16, 0x18, 0x1a,
136-
0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38}, 128},
137+
CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32
137138
*/
139+
#ifdef CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32
140+
DRAM_ATTR static const ili_init_cmd_t ili_init_cmds[] = {
141+
// VCI=2.8V
142+
//************* Start Initial Sequence **********//
143+
{TFT_CMD_SWRESET, {0}, 0x80},
144+
{0xCF, {0x00, 0xc3, 0x30}, 3},
145+
{0xED, {0x64, 0x03, 0x12, 0x81}, 4},
146+
{0xE8, {0x85, 0x00, 0x78}, 3},
147+
{0xCB, {0x39, 0x2c, 0x00, 0x34, 0x02}, 5},
148+
{0xF7, {0x20}, 1},
149+
{0xEA, {0x00, 0x00}, 2},
150+
{0xC0, {0x1B}, 1}, //Power control //VRH[5:0]
151+
{0xC1, {0x12}, 1}, //Power control //SAP[2:0];BT[3:0]
152+
{0xC5, {0x32, 0x3C}, 2}, //VCM control
153+
{0x36, {(MADCTL_MV | MADCTL_MY | TFT_RGB_BGR)}, 1}, // Memory Access Control
154+
{0x3A, {0x55}, 1},
155+
{0xB1, {0x00, 0x1B}, 2}, // Frame Rate Control (1B=70, 1F=61, 10=119)
156+
{0xB6, {0x0A, 0xA2}, 2}, // Display Function Control
157+
{0xF6, {0x01, 0x30}, 2},
158+
{0xF2, {0x00}, 1}, // 3Gamma Function Disable
159+
{0x26, {0x01}, 1}, //Gamma curve selected
160+
161+
//Set Gamma
162+
{0xE0, {0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00}, 15},
163+
{0XE1, {0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F}, 15},
164+
165+
// ILI9342 Specific
166+
{0x36, {0x40|0x80|0x08}, 1}, // <-- ROTATE
167+
{0x21, {0}, 0x80}, // <-- INVERT COLORS
138168

139169
{0x11, {0}, 0x80}, //Exit Sleep
140170
{0x29, {0}, 0x80}, //Display on
141-
142171
{0, {0}, 0xff}
143172
};
173+
#endif
144174

145175
static inline uint16_t* line_buffer_get()
146176
{

Firmware/Releases/retro-esp.zip

78 Bytes
Binary file not shown.
128 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)