summaryrefslogtreecommitdiff
path: root/wasp/boards
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-03-08 10:18:08 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-03-08 10:18:08 (GMT)
commitb5b96bd7760f76d9bb476eb835f49b3c9586ca5c (patch)
tree2c9f5e9d4682a1efc870754d2e37d680f33925a2 /wasp/boards
parent753a1e68f114772cd0fce765c7ec4770c8e34036 (diff)
wasp: Integrate the touch driver
At this point we are starting to bring an event model for applications but there's still a long way to go!
Diffstat (limited to 'wasp/boards')
-rw-r--r--wasp/boards/pinetime/manifest.py2
-rw-r--r--wasp/boards/simulator/display.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/wasp/boards/pinetime/manifest.py b/wasp/boards/pinetime/manifest.py
index 4787520..b3e2e17 100644
--- a/wasp/boards/pinetime/manifest.py
+++ b/wasp/boards/pinetime/manifest.py
@@ -11,12 +11,14 @@ freeze('../..',
'drivers/signal.py',
'drivers/st7789.py',
'drivers/vibrator.py',
+ 'flashlight.py',
'fonts/clock.py',
'fonts/sans24.py',
'icons.py',
'logo.py',
'manager.py',
'shell.py',
+ 'testapp.py',
'widgets.py',
),
opt=3
diff --git a/wasp/boards/simulator/display.py b/wasp/boards/simulator/display.py
index 93ac8ae..41d9512 100644
--- a/wasp/boards/simulator/display.py
+++ b/wasp/boards/simulator/display.py
@@ -77,7 +77,10 @@ class CST816SSim():
raise OSError
dbuf[:] = self.regs[reg:len(dbuf)+reg]
- self.regs[1] = 0
+ if self.regs[3]:
+ self.regs[3] = 0
+ else:
+ self.regs[1] = 0
def handle_key(self, key):
if key.keysym.sym == sdl2.SDLK_DOWN:
@@ -88,6 +91,7 @@ class CST816SSim():
self.regs[1] = 3
elif key.keysym.sym == sdl2.SDLK_RIGHT:
self.regs[1] = 4
+ self.regs[3] = 0x80
self.raise_interrupt()
def handle_mousebutton(self, button):