AcidDropUI/AcidDrop UI PIO/lib/TFT_eSPI/TFT_Drivers/RM68140_Init.h

78 lines
1.4 KiB
C
Raw Normal View History

2024-06-06 05:12:19 +00:00
// This is the command sequence that initialises the RM68140 driver
//
// This setup information uses simple 8 bit SPI writecommand() and writedata() functions
//
// See ST7735_Setup.h file for an alternative format
// Configure RM68140 display
writecommand(TFT_SLPOUT);
delay(20);
writecommand(0xD0);
writedata(0x07);
writedata(0x42);
writedata(0x18);
writecommand(0xD1);
writedata(0x00);
writedata(0x07);
writedata(0x10);
writecommand(0xD2);
writedata(0x01);
writedata(0x02);
writecommand(0xC0);
writedata(0x10);
writedata(0x3B);
writedata(0x00);
writedata(0x02);
writedata(0x11);
writecommand(0xC5);
writedata(0x03);
writecommand(0xC8);
writedata(0x00);
writedata(0x32);
writedata(0x36);
writedata(0x45);
writedata(0x06);
writedata(0x16);
writedata(0x37);
writedata(0x75);
writedata(0x77);
writedata(0x54);
writedata(0x0C);
writedata(0x00);
writecommand(TFT_MADCTL);
writedata(0x0A);
writecommand(0x3A);
writedata(0x55);
writecommand(TFT_CASET);
writedata(0x00);
writedata(0x00);
writedata(0x01);
writedata(0x3F);
writecommand(TFT_PASET);
writedata(0x00);
writedata(0x00);
writedata(0x01);
writedata(0xDF);
delay(120);
writecommand(TFT_DISPON);
delay(25);
// End of RM68140 display configuration