wasp: simulator: Add support for machine.[light|deep]sleep()
This commit is contained in:
parent
d0f18a15fa
commit
a5caa845b7
|
@ -1,4 +1,5 @@
|
||||||
import display
|
import display
|
||||||
|
import time
|
||||||
|
|
||||||
class Tracer(object):
|
class Tracer(object):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -66,3 +67,10 @@ class SPI(object):
|
||||||
self.sim.write(buf)
|
self.sim.write(buf)
|
||||||
else:
|
else:
|
||||||
print("Sending data: " + str(buf))
|
print("Sending data: " + str(buf))
|
||||||
|
|
||||||
|
def lightsleep(ms=10):
|
||||||
|
"""TODO: This where we should manage the simulated components"""
|
||||||
|
time.sleep(ms / 1000)
|
||||||
|
|
||||||
|
def deepsleep(ms=10):
|
||||||
|
lightsleep(ms)
|
||||||
|
|
Loading…
Reference in a new issue