diff --git a/artiq/runtime/rtio.c b/artiq/runtime/rtio.c index 00eecbc2f..0670a4e2b 100644 --- a/artiq/runtime/rtio.c +++ b/artiq/runtime/rtio.c @@ -43,11 +43,16 @@ void rtio_process_exceptional_status(int status, long long int timestamp, int ch void rtio_output(long long int timestamp, int channel, unsigned int addr, unsigned int data) { + int status; + rtio_chan_sel_write(channel); rtio_o_timestamp_write(timestamp); rtio_o_address_write(addr); rtio_o_data_write(data); - rtio_write_and_process_status(timestamp, channel); + rtio_o_we_write(1); + status = rtio_o_status_read(); + if(status) + rtio_process_exceptional_status(status, timestamp, channel); } diff --git a/artiq/runtime/rtio.h b/artiq/runtime/rtio.h index d311fbb55..9cebb6f2f 100644 --- a/artiq/runtime/rtio.h +++ b/artiq/runtime/rtio.h @@ -21,14 +21,4 @@ void rtio_output(long long int timestamp, int channel, unsigned int address, unsigned int data); int rtio_input_wait(long long int timeout, int channel); -static inline void rtio_write_and_process_status(long long int timestamp, int channel) -{ - int status; - - rtio_o_we_write(1); - status = rtio_o_status_read(); - if(status) - rtio_process_exceptional_status(status, timestamp, channel); -} - #endif /* __RTIO_H */