forked from M-Labs/artiq
runtime: fix rtio::log
This commit is contained in:
parent
0c47f83634
commit
8ebca38323
|
@ -140,17 +140,18 @@ pub fn log(timestamp: i64, data: &[u8]) {
|
|||
for i in 0..data.len() {
|
||||
word <<= 8;
|
||||
word |= data[i] as u32;
|
||||
if i != 0 && i % 4 == 0 {
|
||||
if i % 4 == 3 {
|
||||
rtio_o_data_write(0, word);
|
||||
csr::rtio::o_we_write(1);
|
||||
word = 0;
|
||||
}
|
||||
}
|
||||
|
||||
word <<= 8;
|
||||
if word != 0 {
|
||||
rtio_o_data_write(0, word);
|
||||
csr::rtio::o_we_write(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(has_rtio_log))]
|
||||
|
|
Loading…
Reference in New Issue