forked from M-Labs/artiq
1
0
Fork 0

examples/coredev_test: use CoreCom as a context manager

This commit is contained in:
Sebastien Bourdeauducq 2014-07-05 22:53:48 +02:00
parent b152ecca1f
commit 2f334589f0
1 changed files with 7 additions and 6 deletions

View File

@ -9,7 +9,8 @@ class CompilerTest(Experiment):
self.led.set(1) self.led.set(1)
if __name__ == "__main__": if __name__ == "__main__":
coredev = core.Core(runtime.Environment(), corecom_serial.CoreCom()) with corecom_serial.CoreCom() as com:
coredev = core.Core(runtime.Environment(), com)
exp = CompilerTest( exp = CompilerTest(
core=coredev, core=coredev,
led=gpio_core.GPIOOut(coredev, 0) led=gpio_core.GPIOOut(coredev, 0)