Add new init sequence for LilyGo T Display S3
This commit is contained in:
parent
174f98862c
commit
6553d81f89
|
|
@ -5,6 +5,7 @@
|
|||
//
|
||||
// See ST7735_Setup.h file for an alternative format
|
||||
|
||||
#ifndef INIT_SEQUENCE_3
|
||||
{
|
||||
writecommand(ST7789_SLPOUT); // Sleep out
|
||||
delay(120);
|
||||
|
|
@ -126,3 +127,103 @@
|
|||
pinMode(TFT_BL, OUTPUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
// TTGO ESP32 S3 T-Display
|
||||
{
|
||||
writecommand(ST7789_SLPOUT); // Sleep out
|
||||
delay(120);
|
||||
|
||||
writecommand(ST7789_NORON); // Normal display mode on
|
||||
|
||||
//------------------------------display and color format setting--------------------------------//
|
||||
writecommand(ST7789_MADCTL);
|
||||
writedata(TFT_MAD_COLOR_ORDER);
|
||||
|
||||
//--------------------------------ST7789V Frame rate setting----------------------------------//
|
||||
writecommand(ST7789_PORCTRL);
|
||||
writedata(0x0b);
|
||||
writedata(0x0b);
|
||||
writedata(0x00);
|
||||
writedata(0x33);
|
||||
writedata(0x33);
|
||||
|
||||
writecommand(ST7789_GCTRL); // Voltages: VGH / VGL
|
||||
writedata(0x75);
|
||||
|
||||
//---------------------------------ST7789V Power setting--------------------------------------//
|
||||
writecommand(ST7789_VCOMS);
|
||||
writedata(0x28); // JLX240 display datasheet
|
||||
|
||||
writecommand(ST7789_LCMCTRL);
|
||||
writedata(0x2C);
|
||||
|
||||
writecommand(ST7789_VDVVRHEN);
|
||||
writedata(0x01);
|
||||
|
||||
writecommand(ST7789_VRHS); // voltage VRHS
|
||||
writedata(0x1F);
|
||||
|
||||
writecommand(ST7789_FRCTR2);
|
||||
writedata(0x13);
|
||||
|
||||
writecommand(ST7789_PWCTRL1);
|
||||
writedata(0xa7);
|
||||
|
||||
writecommand(ST7789_PWCTRL1);
|
||||
writedata(0xa4);
|
||||
writedata(0xa1);
|
||||
|
||||
writecommand(0xD6);
|
||||
writedata(0xa1);
|
||||
|
||||
//--------------------------------ST7789V gamma setting---------------------------------------//
|
||||
writecommand(ST7789_PVGAMCTRL);
|
||||
writedata(0xf0);
|
||||
writedata(0x05);
|
||||
writedata(0x0a);
|
||||
writedata(0x06);
|
||||
writedata(0x06);
|
||||
writedata(0x03);
|
||||
writedata(0x2b);
|
||||
writedata(0x32);
|
||||
writedata(0x43);
|
||||
writedata(0x36);
|
||||
writedata(0x11);
|
||||
writedata(0x10);
|
||||
writedata(0x2b);
|
||||
writedata(0x32);
|
||||
|
||||
writecommand(ST7789_NVGAMCTRL);
|
||||
writedata(0xf0);
|
||||
writedata(0x08);
|
||||
writedata(0x0c);
|
||||
writedata(0x0b);
|
||||
writedata(0x09);
|
||||
writedata(0x24);
|
||||
writedata(0x2b);
|
||||
writedata(0x22);
|
||||
writedata(0x43);
|
||||
writedata(0x38);
|
||||
writedata(0x15);
|
||||
writedata(0x16);
|
||||
writedata(0x2f);
|
||||
writedata(0x37);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
end_tft_write();
|
||||
delay(120);
|
||||
begin_tft_write();
|
||||
|
||||
writecommand(ST7789_DISPON); //Display on
|
||||
delay(120);
|
||||
|
||||
#ifdef TFT_BL
|
||||
// Turn on the back-light LED
|
||||
digitalWrite(TFT_BL, HIGH);
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
#define USER_SETUP_ID 206
|
||||
|
||||
#define ST7789_DRIVER
|
||||
#define INIT_SEQUENCE_3 // Using this initialisation sequence improves the display image
|
||||
|
||||
#define CGRAM_OFFSET
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
|
|
|
|||
Loading…
Reference in New Issue