forked from M-Labs/artiq
runtime: add rtio_replace syscall
This commit is contained in:
parent
f0c2003778
commit
10d796e026
@ -10,6 +10,7 @@ _syscalls = {
|
||||
"rpc": "i+:i",
|
||||
"gpio_set": "ii:n",
|
||||
"rtio_set": "Iii:n",
|
||||
"rtio_replace": "Iii:n",
|
||||
"rtio_sync": "i:n",
|
||||
"dds_program": "ii:n",
|
||||
}
|
||||
|
@ -17,6 +17,14 @@ void rtio_set(long long int timestamp, int channel, int value)
|
||||
rtio_o_we_write(1);
|
||||
}
|
||||
|
||||
void rtio_replace(long long int timestamp, int channel, int value)
|
||||
{
|
||||
rtio_chan_sel_write(channel);
|
||||
rtio_o_timestamp_write(timestamp);
|
||||
rtio_o_value_write(value);
|
||||
rtio_o_replace_write(1);
|
||||
}
|
||||
|
||||
void rtio_sync(int channel)
|
||||
{
|
||||
rtio_chan_sel_write(channel);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
void rtio_init(void);
|
||||
void rtio_set(long long int timestamp, int channel, int value);
|
||||
void rtio_replace(long long int timestamp, int channel, int value);
|
||||
void rtio_sync(int channel);
|
||||
|
||||
#endif /* __RTIO_H */
|
||||
|
@ -11,6 +11,7 @@ static const struct symbol syscalls[] = {
|
||||
{"rpc", rpc},
|
||||
{"gpio_set", gpio_set},
|
||||
{"rtio_set", rtio_set},
|
||||
{"rtio_replace", rtio_replace},
|
||||
{"rtio_sync", rtio_sync},
|
||||
{"dds_program", dds_program},
|
||||
{NULL, NULL}
|
||||
|
Loading…
Reference in New Issue
Block a user