forked from M-Labs/artiq
examples/coredev_test: use CoreCom as a context manager
This commit is contained in:
parent
b152ecca1f
commit
2f334589f0
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue