summaryrefslogtreecommitdiff
path: root/wasp/drivers
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-01-23 22:00:42 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-01-28 18:45:26 (GMT)
commit8f231430b31cbd434ed1906ad480c5ecf20827e6 (patch)
tree6042e2533818021f7e03a0caff2d40e12645366e /wasp/drivers
parent06b8730af80f4441635b9f16cb0c967d4074e486 (diff)
logo: Gather together the bitmaps into a single variable
The PineTime demo will also now cycle through both the Pine64 and MicroPython logos.
Diffstat (limited to 'wasp/drivers')
-rw-r--r--wasp/drivers/st7789.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wasp/drivers/st7789.py b/wasp/drivers/st7789.py
index a7c3756..c3f22fc 100644
--- a/wasp/drivers/st7789.py
+++ b/wasp/drivers/st7789.py
@@ -83,15 +83,16 @@ class ST7789(object):
for y in range(self.height):
self.write_data(self.linebuffer)
- def rleblit(self, sx, sy, image, fg=0xffff, bg=0):
+ def rleblit(self, image, fg=0xffff, bg=0):
+ (sx, sy, rle) = image
self.set_window()
- # TODO: rework algorithm to allow us to reuse the line buffer
+ # TODO: rework algorithm to allow us to reuse the line buffer
buf = bytearray(2*sx)
bp = 0
color = bg
- for rl in image:
+ for rl in rle:
while rl:
buf[bp] = color >> 8
buf[bp+1] = color & 0xff