mirror of https://github.com/m-labs/artiq.git
devices: add RTIO support
This commit is contained in:
parent
043c4345e5
commit
041540089a
|
@ -5,7 +5,8 @@ lt.initialize_all()
|
||||||
|
|
||||||
_syscalls = [
|
_syscalls = [
|
||||||
("rpc", "i+:i"),
|
("rpc", "i+:i"),
|
||||||
("gpio_set", "ii:v")
|
("gpio_set", "ii:v"),
|
||||||
|
("rtio_set", "iii:v")
|
||||||
]
|
]
|
||||||
|
|
||||||
def _str_to_functype(s):
|
def _str_to_functype(s):
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
from artiq.language.core import *
|
||||||
|
|
||||||
|
class TTLOut(MPO):
|
||||||
|
parameters = "channel"
|
||||||
|
|
||||||
|
@kernel
|
||||||
|
def pulse(self, duration):
|
||||||
|
syscall("rtio_set", now(), self.channel, 1)
|
||||||
|
delay(duration)
|
||||||
|
syscall("rtio_set", now(), self.channel, 0)
|
Loading…
Reference in New Issue