2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-05 09:46:36 +08:00
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)