Skip to content

Commit

Permalink
Add RC configuration for ESPlay Micro V2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cralex committed Jan 28, 2023
1 parent 21085b3 commit cfcd09d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions components/retro-go/rg_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,32 @@ static void lcd_init(void)
ILI9341_CMD(0x21, {0x80});
ILI9341_CMD(0x11, {0x80}); // Exit Sleep
ILI9341_CMD(0x29, {0x80}); // Display on
#elif RG_SCREEN_TYPE == 6 // ESPlay Micro V2 Screen
ILI9341_CMD(0xCF, {0x00, 0x83, 0X30});
ILI9341_CMD(0xED, {0x64, 0x03, 0X12, 0X81});
ILI9341_CMD(0xE8, {0x85, 0x01, 0x79});
ILI9341_CMD(0xCB, {0x39, 0x2C, 0x00, 0x34, 0x02});
ILI9341_CMD(0xF7, {0x20});
ILI9341_CMD(0xEA, {0x00, 0x00});
ILI9341_CMD(0xC0, {0x26}); // Power control
ILI9341_CMD(0xC1, {0x11}); // Power control
ILI9341_CMD(0xC5, {0x35, 0x3E}); // VCM control
ILI9341_CMD(0x36, {(0x20|0x80|0x08)}); // Memory Access Control
ILI9341_CMD(0x3A, {0x55}); // Pixel Format Set RGB565
ILI9341_CMD(0xB1, {0x00, 0x1B}); // Frame Rate Control (1B=70, 1F=61, 10=119)
ILI9341_CMD(0xB6, {0x0A, 0xA2}); // Display Function Control
ILI9341_CMD(0xF6, {0x01, 0x30});
ILI9341_CMD(0xF2, {0x00});
ILI9341_CMD(0x26, {0x01});
ILI9341_CMD(0xE0, {0x1F, 0x1A, 0x18, 0x0A, 0x0F, 0x06, 0x45, 0X87, 0x32, 0x0A, 0x07, 0x02, 0x07, 0x05, 0x00}); // Set Gamma
ILI9341_CMD(0xE1, {0x00, 0x25, 0x27, 0x05, 0x10, 0x09, 0x3A, 0x78, 0x4D, 0x05, 0x18, 0x0D, 0x38, 0x3A, 0x1F}); // Set Gamma
ILI9341_CMD(0x2A, {0x00, 0x00, 0x00, 0xEF});
ILI9341_CMD(0x2B, {0x00, 0x00, 0x01, 0x3f});
ILI9341_CMD(0x2C, {0x00});
ILI9341_CMD(0xB7, {0x07});
ILI9341_CMD(0xB6, {0x0A, 0x82, 0x27, 0x00});
ILI9341_CMD(0x11, {0x80}); //Exit Sleep
ILI9341_CMD(0x29, {0x80}); //Display on
#else
#error "LCD init sequence is not defined for this device!"
#endif
Expand Down

0 comments on commit cfcd09d

Please sign in to comment.