Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions examples/PDQgraphicstest/Arduino_GFX_dev_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// #define ESP32_4848S040_86BOX_GUITION
// #define ESP32_8048S043
// #define ESP32_8048S070
// #define JC4880P433
// #define ESP32_LCDKIT_SPI
// #define ESP32_LCDKIT_PAR8A
// #define ESP32_LCDKIT_PAR8B
Expand Down Expand Up @@ -235,6 +236,25 @@ Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel(
Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
480 /* width */, 480 /* height */, rgbpanel, 1 /* rotation */, true /* auto_flush */,
bus, GFX_NOT_DEFINED /* RST */, st7701_type9_init_operations, sizeof(st7701_type9_init_operations));
#elif defined(JC4880P433)
#define GFX_DEV_DEVICE JC4880P433
#define GFX_BL 23
#define RGB_PANEL

Arduino_ESP32DSIPanel *bus = new Arduino_ESP32DSIPanel(
12 /* hsync_pulse_width */, 42 /* hsync_back_porch */, 42 /* hsync_front_porch */,
2 /* vsync_pulse_width */, 8 /* vsync_back_porch */, 166 /* vsync_front_porch */,
34000000 /* prefer_speed - 34 MHz conforme configuração do projeto */);

Arduino_DSI_Display *gfx = new Arduino_DSI_Display(
480 /* width */,
800 /* height */,
bus,
0, // rotation
true, // IPS
5, // RST pin (DISP_RST)
st7701_dsi_init_operations,
sizeof(st7701_dsi_init_operations) / sizeof(lcd_init_cmd_t));

#elif defined(ESP32_8048S043)
#define GFX_DEV_DEVICE ESP32_8048S043
Expand Down
43 changes: 43 additions & 0 deletions src/display/Arduino_RGB_Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,49 @@ static const uint8_t gc9503v_type2_init_operations[] = {

DELAY, 120};

static const lcd_init_cmd_t st7701_dsi_init_operations[] = {
// {cmd, { data }, data_size, delay_ms}
{0xFF, (uint8_t[]){0x77, 0x01, 0x00, 0x00, 0x13}, 5, 0},
{0xEF, (uint8_t[]){0x08}, 1, 0},
{0xFF, (uint8_t[]){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0},
{0xC0, (uint8_t[]){0x63, 0x00}, 2, 0},
{0xC1, (uint8_t[]){0x0D, 0x02}, 2, 0},
{0xC2, (uint8_t[]){0x10, 0x08}, 2, 0},
{0xCC, (uint8_t[]){0x10}, 1, 0},
{0xB0, (uint8_t[]){0x80, 0x09, 0x53, 0x0C, 0xD0, 0x07, 0x0C, 0x09, 0x09, 0x28, 0x06, 0xD4, 0x13, 0x69, 0x2B, 0x71}, 16, 0},
{0xB1, (uint8_t[]){0x80, 0x94, 0x5A, 0x10, 0xD3, 0x06, 0x0A, 0x08, 0x08, 0x25, 0x03, 0xD3, 0x12, 0x66, 0x6A, 0x0D}, 16, 0},
{0xFF, (uint8_t[]){0x77, 0x01, 0x00, 0x00, 0x11}, 5, 0},
{0xB0, (uint8_t[]){0x5D}, 1, 0},
{0xB1, (uint8_t[]){0x58}, 1, 0},
{0xB2, (uint8_t[]){0x87}, 1, 0},
{0xB3, (uint8_t[]){0x80}, 1, 0},
{0xB5, (uint8_t[]){0x4E}, 1, 0},
{0xB7, (uint8_t[]){0x85}, 1, 0},
{0xB8, (uint8_t[]){0x21}, 1, 0},
{0xB9, (uint8_t[]){0x10, 0x1F}, 2, 0},
{0xBB, (uint8_t[]){0x03}, 1, 0},
{0xBC, (uint8_t[]){0x00}, 1, 0},
{0xC1, (uint8_t[]){0x78}, 1, 0},
{0xC2, (uint8_t[]){0x78}, 1, 0},
{0xD0, (uint8_t[]){0x88}, 1, 0},
{0xE0, (uint8_t[]){0x00, 0x3A, 0x02}, 3, 0},
{0xE1, (uint8_t[]){0x04, 0xA0, 0x00, 0xA0, 0x05, 0xA0, 0x00, 0xA0, 0x00, 0x40, 0x40}, 11, 0},
{0xE2, (uint8_t[]){0x30, 0x00, 0x40, 0x40, 0x32, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00}, 13, 0},
{0xE3, (uint8_t[]){0x00, 0x00, 0x33, 0x33}, 4, 0},
{0xE4, (uint8_t[]){0x44, 0x44}, 2, 0},
{0xE5, (uint8_t[]){0x09, 0x2E, 0xA0, 0xA0, 0x0B, 0x30, 0xA0, 0xA0, 0x05, 0x2A, 0xA0, 0xA0, 0x07, 0x2C, 0xA0, 0xA0}, 16, 0},
{0xE6, (uint8_t[]){0x00, 0x00, 0x33, 0x33}, 4, 0},
{0xE7, (uint8_t[]){0x44, 0x44}, 2, 0},
{0xE8, (uint8_t[]){0x08, 0x2D, 0xA0, 0xA0, 0x0A, 0x2F, 0xA0, 0xA0, 0x04, 0x29, 0xA0, 0xA0, 0x06, 0x2B, 0xA0, 0xA0}, 16, 0},
{0xEB, (uint8_t[]){0x00, 0x00, 0x4E, 0x4E, 0x00, 0x00, 0x00}, 7, 0},
{0xEC, (uint8_t[]){0x08, 0x01}, 2, 0},
{0xED, (uint8_t[]){0xB0, 0x2B, 0x98, 0xA4, 0x56, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x65, 0x4A, 0x89, 0xB2, 0x0B}, 16, 0},
{0xEF, (uint8_t[]){0x08, 0x08, 0x08, 0x45, 0x3F, 0x54}, 6, 0},
{0xFF, (uint8_t[]){0x77, 0x01, 0x00, 0x00, 0x00}, 5, 0},
{0x11, (uint8_t[]){0x00}, 1, 120}, // Sleep Out - delay de 120ms
{0x29, (uint8_t[]){0x00}, 1, 20}, // Display On - delay de 20ms
};

static const uint8_t st7701_type1_init_operations[] = {
BEGIN_WRITE,
WRITE_COMMAND_8, 0xFF,
Expand Down