nac3artiq: allow creating drivers on device

This commit is contained in:
Sebastien Bourdeauducq 2021-10-09 15:51:47 +08:00
parent 8b32c8270d
commit 6ba74ed9f6
1 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,10 @@ def rtio_input_data(channel: int32) -> int32:
@kernel @kernel
class Core: class Core:
@portable
def __init__(self):
pass
def run(self, method, *args, **kwargs): def run(self, method, *args, **kwargs):
global allow_module_registration global allow_module_registration
if allow_module_registration: if allow_module_registration:
@ -106,6 +110,7 @@ class TTLOut:
channel: int32 channel: int32
target_o: int32 target_o: int32
@portable
def __init__(self, channel: int32): def __init__(self, channel: int32):
self.channel = channel self.channel = channel
self.target_o = channel << 8 self.target_o = channel << 8