diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-01-28 18:30:04 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-01-28 18:45:27 (GMT) |
| commit | 64743175746e46a3df713d79a359ad88f44ea6a9 (patch) | |
| tree | bb780b3ed1c818b16d5804e3ca6facce4bfbe508 | |
| parent | e31162ae22491bca7f66fd39c23036c4858aa654 (diff) | |
wasp: pinetime: Fix backlight flicker during bootup
| -rw-r--r-- | wasp/pinetime.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wasp/pinetime.py b/wasp/pinetime.py index b5afa33..cdbb230 100644 --- a/wasp/pinetime.py +++ b/wasp/pinetime.py @@ -8,12 +8,13 @@ def st7789(): # Mode 3, maximum clock speed! spi.init(polarity=1, phase=1, baudrate=8000000) - # Extra pins required by the driver + # Configure the display cs = Pin("SPI_SS2", Pin.OUT) dc = Pin("P18", Pin.OUT) rst = Pin("P26", Pin.OUT) - bl = Pin("P22", Pin.OUT) - tft = ST7789_SPI(240, 240, spi, cs=cs, dc=dc, res=rst) + + # Bring up the backlight + bl = Pin("P22", Pin.OUT) bl.off() # active low return tft |
