forked from M-Labs/artiq
Sebastien Bourdeauducq
2a843ea436
This allows specifying default values for parameters, and other data.
15 lines
287 B
Python
15 lines
287 B
Python
from artiq.language.core import *
|
|
from artiq.language.context import *
|
|
|
|
|
|
class GPIOOut(AutoContext):
|
|
channel = Parameter()
|
|
|
|
@kernel
|
|
def on(self):
|
|
syscall("gpio_set", self.channel, True)
|
|
|
|
@kernel
|
|
def off(self):
|
|
syscall("gpio_set", self.channel, False)
|