1
0
forked from M-Labs/artiq
artiq/artiq/coredevice/gpio.py

14 lines
251 B
Python

from artiq.language.core import *
class GPIOOut(AutoContext):
parameters = "channel"
@kernel
def on(self):
syscall("gpio_set", self.channel, True)
@kernel
def off(self):
syscall("gpio_set", self.channel, False)