wasp: simulator: Add support for machine.[light|deep]sleep()
This commit is contained in:
parent
d0f18a15fa
commit
a5caa845b7
1 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import display
|
||||
import time
|
||||
|
||||
class Tracer(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -66,3 +67,10 @@ class SPI(object):
|
|||
self.sim.write(buf)
|
||||
else:
|
||||
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…
Add table
Reference in a new issue