summaryrefslogtreecommitdiff
path: root/wasp/boards/pinetime/watch.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-03-08 23:16:30 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-03-08 23:16:30 (GMT)
commit5413d826d7ffe825b759cd013f9f68e9311aee01 (patch)
treeb4d111931455dffc8a3ea7e4bab219ad856072c3 /wasp/boards/pinetime/watch.py
parent24438ad05daae80c4d27c6e8d0345bfd61d5578b (diff)
wasp: Re-factor how Draw565 is used.
Moving it from applications into the watch is useful for two reasons. Firstly it means applications don't need to know as much about the display color depth and secondly it makes it easier to replace the drawing routines with wasptool.
Diffstat (limited to 'wasp/boards/pinetime/watch.py')
-rw-r--r--wasp/boards/pinetime/watch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wasp/boards/pinetime/watch.py b/wasp/boards/pinetime/watch.py
index 7e4ee6f..332d761 100644
--- a/wasp/boards/pinetime/watch.py
+++ b/wasp/boards/pinetime/watch.py
@@ -7,6 +7,8 @@ rtc.counter.start()
import os
import time
+import draw565
+
from machine import I2C
from machine import Pin
#from machine import Signal
@@ -51,6 +53,7 @@ display = ST7789_SPI(240, 240, spi,
cs=Pin("DISP_CS", Pin.OUT),
dc=Pin("DISP_DC", Pin.OUT),
res=Pin("DISP_RST", Pin.OUT))
+drawable = draw565.Draw565(display)
# Setup the last few bits and pieces
battery = Battery(