diff options
Diffstat (limited to 'wasp/boards/simulator/micropython.py')
| -rw-r--r-- | wasp/boards/simulator/micropython.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wasp/boards/simulator/micropython.py b/wasp/boards/simulator/micropython.py index 41c30a4..804f514 100644 --- a/wasp/boards/simulator/micropython.py +++ b/wasp/boards/simulator/micropython.py @@ -11,9 +11,13 @@ def viper(fn): def ptr8(buf): return buf + def ptr16(buf): + return memoryview(buf).cast('H') + # This is a bit of a hack since the scope for ptr8 won't be right # but it does mean no changes to the client fn.__globals__['ptr8'] = ptr8 + fn.__globals__['ptr16'] = ptr16 return fn |
