Skip to content

Commit

Permalink
update display_init_sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhenghj authored Nov 28, 2024
1 parent 8741765 commit 8c6c313
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions ports/espressif/boards/waveshare_esp32_c6_lcd_1_47/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,35 @@

#define DELAY 0x80

// display init sequence according to https://github.com/adafruit/Adafruit_CircuitPython_ST7789
uint8_t display_init_sequence[] = {
0x01, 0x80, 0x96, // _SWRESET and Delay 150ms
0x11, 0x80, 0xFF, // _SLPOUT and Delay 500ms
0x3A, 0x81, 0x55, 0x0A, // _COLMOD and Delay 10ms
0x36, 0x01, 0x08, // _MADCTL
0x21, 0x80, 0x0A, // _INVON Hack and Delay 10ms
0x13, 0x80, 0x0A, // _NORON and Delay 10ms
0x36, 0x01, 0xC0, // _MADCTL
0x29, 0x80, 0xFF, // _DISPON and Delay 500ms
// sw reset
0x01, 0 | DELAY, 150,
// sleep out
0x11, 0 | DELAY, 255,
// normal display mode on
0x13, 0,
// display and color format settings
0x36, 1, 0x68,
0xB6, 2, 0x0A, 0x82,
0x3A, 1 | DELAY, 0x55, 10,
// ST7789V frame rate setting
0xB2, 5, 0x0C, 0x0C, 0x00, 0x33, 0x33,
// voltages: VGH / VGL
0xB7, 1, 0x35,
// ST7789V power setting
0xBB, 1, 0x28,
0xC0, 1, 0x0C,
0xC2, 2, 0x01, 0xFF,
0xC3, 1, 0x10,
0xC4, 1, 0x20,
0xC6, 1, 0x0F,
0xD0, 2, 0xA4, 0xA1,
// ST7789V gamma setting
0xE0, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x32, 0x44, 0x42, 0x06, 0x0E, 0x12, 0x14, 0x17,
0xE1, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x31, 0x54, 0x47, 0x0E, 0x1C, 0x17, 0x1B, 0x1E,
0x21, 0,
// display on
0x29, 0 | DELAY, 255,
};

static void display_init(void) {
Expand Down

0 comments on commit 8c6c313

Please sign in to comment.