Skip to content

Commit

Permalink
Merge pull request ducalex#62 from Cralex/patch-1
Browse files Browse the repository at this point in the history
Add Display Driver for MRGC Game Box Mini
  • Loading branch information
ducalex committed Nov 8, 2022
2 parents 4227b6d + 306193b commit 87eb865
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/retro-go/rg_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,22 @@ static void lcd_init(void)
ILI9341_CMD(0x11, {0x03}); //Exit Sleep
ILI9341_CMD(0x29, {0x03}); //Display on
usleep(100 * 1000);
#elif RG_SCREEN_TYPE == 5 // Game Box Mini Screen
ILI9341_CMD(0x3A, {0x55}); // Pixel Format Set RGB565
ILI9341_CMD(0x0c, {0x0c, 0x00, 0x33, 0x33});
ILI9341_CMD(0xB7, {0x72});
ILI9341_CMD(0xBB, {0x3d});
ILI9341_CMD(0xC0, {0x2C}); // Power control
ILI9341_CMD(0xC2, {0x01, 0xFF});
ILI9341_CMD(0xC3, {0x19});
ILI9341_CMD(0xC4, {0x20});
ILI9341_CMD(0xC6, {0x0f});
ILI9341_CMD(0xD0, {0xA4, 0xA1});
ILI9341_CMD(0xE0, {0xD0, 0x00, 0x05, 0x0E, 0x15, 0x0D, 0x37, 0x43, 0x47, 0x09, 0x15, 0x12, 0x16, 0x19}); // Set Gamma
ILI9341_CMD(0xE1, {0xD0, 0x00, 0x05, 0x0D, 0x0C, 0x06, 0x2D, 0x44, 0x40, 0x0E, 0x1C, 0x18, 0x16, 0x19}); // Set Gamma
ILI9341_CMD(0x21, {0x80});
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 87eb865

Please sign in to comment.