kopia lustrzana https://github.com/pimoroni/pimoroni-pico
st7789: Avoid static flash on LCD init.
rodzic
0a66e43051
commit
c127c63153
|
|
@ -112,9 +112,6 @@ namespace pimoroni {
|
|||
|
||||
command(reg::INVON); // set inversion mode
|
||||
command(reg::SLPOUT); // leave sleep mode
|
||||
command(reg::DISPON); // turn display on
|
||||
|
||||
sleep_ms(100);
|
||||
|
||||
configure_display(rotation);
|
||||
|
||||
|
|
@ -314,6 +311,12 @@ namespace pimoroni {
|
|||
|
||||
gpio_put(cs, 1);
|
||||
}
|
||||
|
||||
if(!display_on) {
|
||||
command(reg::DISPON); // turn display on
|
||||
sleep_ms(100);
|
||||
display_on = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ST7789::set_backlight(uint8_t brightness) {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ namespace pimoroni {
|
|||
PIO parallel_pio;
|
||||
uint parallel_offset;
|
||||
uint st_dma;
|
||||
bool display_on = false;
|
||||
|
||||
|
||||
// The ST7789 requires 16 ns between SPI rising edges.
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue