acid-drop/lib/TFT_eSPI/TFT_Drivers/R61581_Init.h

81 lines
1.4 KiB
C
Raw Permalink Normal View History

2024-05-23 22:42:03 +00:00
// This is the command sequence that initialises the R61581 driver
//
// This setup information uses simple 8 bit SPI writecommand() and writedata() functions
//
// See ST7735_Setup.h file for an alternative format
// Configure R61581 display
writecommand(TFT_SLPOUT);
delay(20);
writecommand(0xB0);
writedata(0x00);
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(0x12);
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 R61581 display configuration