mirror of https://github.com/m-labs/artiq.git
devices: add simple GPIO out
This commit is contained in:
parent
a8ef4d8b91
commit
37cd4e7e86
|
@ -0,0 +1,12 @@
|
||||||
|
from artiq.language.experiment import *
|
||||||
|
|
||||||
|
class GPIOOut:
|
||||||
|
def __init__(self, core, channel=0):
|
||||||
|
self.core = core
|
||||||
|
self.channel = channel
|
||||||
|
|
||||||
|
kernel_attr_ro = "channel"
|
||||||
|
|
||||||
|
@kernel
|
||||||
|
def set(self, level):
|
||||||
|
syscall("gpio_set", self.channel, level)
|
Loading…
Reference in New Issue