diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-08 10:18:08 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-08 10:18:08 (GMT) |
| commit | b5b96bd7760f76d9bb476eb835f49b3c9586ca5c (patch) | |
| tree | 2c9f5e9d4682a1efc870754d2e37d680f33925a2 /wasp/boards/simulator/display.py | |
| parent | 753a1e68f114772cd0fce765c7ec4770c8e34036 (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/simulator/display.py')
| -rw-r--r-- | wasp/boards/simulator/display.py | 6 |
1 files changed, 5 insertions, 1 deletions
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): |
