forked from M-Labs/artiq
devices: add simple GPIO out
This commit is contained in:
parent
a8ef4d8b91
commit
37cd4e7e86
12
artiq/devices/gpio_core.py
Normal file
12
artiq/devices/gpio_core.py
Normal file
@ -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
Block a user