@@ -37,36 +37,23 @@ fourwire_fourwire_obj_t board_display_obj;
37
37
38
38
#define DELAY 0x80
39
39
40
- // display init sequence according to LilyGO example app
41
40
uint8_t display_init_sequence [] = {
42
- // sw reset
43
- 0x01 , 0 | DELAY , 150 ,
44
- // sleep out
45
- 0x11 , 0 | DELAY , 255 ,
46
- // normal display mode on
47
- 0x13 , 0 ,
48
- // display and color format settings
49
- 0x36 , 1 , 0x68 ,
50
- 0xB6 , 2 , 0x0A , 0x82 ,
51
- 0x3A , 1 | DELAY , 0x55 , 10 ,
52
- // ST7789V frame rate setting
53
- 0xB2 , 5 , 0x0C , 0x0C , 0x00 , 0x33 , 0x33 ,
54
- // voltages: VGH / VGL
55
- 0xB7 , 1 , 0x35 ,
56
- // ST7789V power setting
57
- 0xBB , 1 , 0x28 ,
58
- 0xC0 , 1 , 0x0C ,
59
- 0xC2 , 2 , 0x01 , 0xFF ,
60
- 0xC3 , 1 , 0x10 ,
61
- 0xC4 , 1 , 0x20 ,
62
- 0xC6 , 1 , 0x0F ,
63
- 0xD0 , 2 , 0xA4 , 0xA1 ,
64
- // ST7789V gamma setting
65
- 0xE0 , 14 , 0xD0 , 0x00 , 0x02 , 0x07 , 0x0A , 0x28 , 0x32 , 0x44 , 0x42 , 0x06 , 0x0E , 0x12 , 0x14 , 0x17 ,
66
- 0xE1 , 14 , 0xD0 , 0x00 , 0x02 , 0x07 , 0x0A , 0x28 , 0x31 , 0x54 , 0x47 , 0x0E , 0x1C , 0x17 , 0x1B , 0x1E ,
41
+ // SWRESET and Delay 140ms
42
+ 0x01 , 0 | DELAY , 140 ,
43
+ // SLPOUT and Delay 10ms
44
+ 0x11 , 0 | DELAY , 10 ,
45
+ // COLMOD 65k colors and 16 bit 5-6-5
46
+ 0x3A , 1 , 0x55 ,
47
+ // INVON Iiversion on
67
48
0x21 , 0 ,
68
- // display on
69
- 0x29 , 0 | DELAY , 255 ,
49
+ // NORON normal operation (full update)
50
+ 0x13 , 0 ,
51
+ // MADCTL columns RTL, page/column reverse order
52
+ 0x36 , 1 , 0x60 ,
53
+ // RAMCTRL color word little endian
54
+ 0xB0 , 2 , 0x00 , 0xF8 ,
55
+ // DIPON display on
56
+ 0x29 , 0 ,
70
57
};
71
58
72
59
@@ -102,7 +89,7 @@ void board_init(void) {
102
89
false, // pixels in a byte share a row. Only valid for depths < 8
103
90
1 , // bytes per cell. Only valid for depths < 8
104
91
false, // reverse_pixels_in_byte. Only valid for depths < 8
105
- true, // reverse_pixels_in_word
92
+ false, // reverse_pixels_in_word
106
93
MIPI_COMMAND_SET_COLUMN_ADDRESS , // set column command
107
94
MIPI_COMMAND_SET_PAGE_ADDRESS , // set row command
108
95
MIPI_COMMAND_WRITE_MEMORY_START , // write memory command
@@ -117,20 +104,10 @@ void board_init(void) {
117
104
60 , // native_frames_per_second
118
105
true, // backlight_on_high
119
106
false, // SH1107_addressing
120
- 50000 // backlight pwm frequency
107
+ 350 // backlight pwm frequency
121
108
);
122
109
}
123
110
124
- bool espressif_board_reset_pin_number (gpio_num_t pin_number ) {
125
- // Override the I2C/TFT power pin reset to prevent resetting the display.
126
- if (pin_number == 21 ) {
127
- // Turn on TFT and I2C
128
- gpio_set_direction (21 , GPIO_MODE_DEF_OUTPUT );
129
- gpio_set_level (21 , true);
130
- return true;
131
- }
132
- return false;
133
- }
134
111
135
112
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
136
113
0 commit comments