examples: core device LED test

This commit is contained in:
Sebastien Bourdeauducq 2014-07-05 22:48:27 +02:00
parent 61c0b65323
commit b152ecca1f
1 changed files with 17 additions and 0 deletions

17
examples/coredev_test.py Normal file
View File

@ -0,0 +1,17 @@
from artiq.language.experiment import Experiment, kernel
from artiq.devices import corecom_serial, runtime, core, gpio_core
class CompilerTest(Experiment):
channels = "core led"
@kernel
def run(self):
self.led.set(1)
if __name__ == "__main__":
coredev = core.Core(runtime.Environment(), corecom_serial.CoreCom())
exp = CompilerTest(
core=coredev,
led=gpio_core.GPIOOut(coredev, 0)
)
exp.run()