mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-28 20:53:35 +08:00
runtime: implement rtio_sync syscall
This commit is contained in:
parent
5573cf3688
commit
dec7c1438f
@ -6,7 +6,8 @@ lt.initialize_all()
|
||||
_syscalls = [
|
||||
("rpc", "i+:i"),
|
||||
("gpio_set", "ii:v"),
|
||||
("rtio_set", "iii:v")
|
||||
("rtio_set", "iii:v"),
|
||||
("rtio_sync", "i:v"),
|
||||
]
|
||||
|
||||
def _str_to_functype(s):
|
||||
|
@ -139,10 +139,17 @@ static void rtio_set(int timestamp, int channel, int value)
|
||||
rtio_o_we_write(1);
|
||||
}
|
||||
|
||||
static void rtio_sync(int channel)
|
||||
{
|
||||
rtio_chan_sel_write(channel);
|
||||
while(rtio_o_level_read() != 0);
|
||||
}
|
||||
|
||||
static const struct symbol syscalls[] = {
|
||||
{"__syscall_rpc", rpc},
|
||||
{"__syscall_gpio_set", gpio_set},
|
||||
{"__syscall_rtio_set", rtio_set},
|
||||
{"__syscall_rtio_sync", rtio_sync},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user