wasp-os/wasp/boards/simulator/micropython.py
Daniel Thompson bb033577da drivers: st7789: Optimize RLE decoding loop
Migrate the filling of the line buffer into a seperate function.
This does naturally reduce the cost of the loop management but
much more importantly allows us to use viper native code
generator.
2020-02-08 07:49:38 +00:00

17 lines
283 B
Python

def const(fn):
return fn
def native(fn):
return fn
def viper(fn):
def ptr8(buf):
return buf
# 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
return fn