forked from M-Labs/artiq
runtime: fix rtio::log
This commit is contained in:
parent
4387b0be1e
commit
0d8bad5128
@ -140,16 +140,17 @@ 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;
|
||||
rtio_o_data_write(0, word);
|
||||
csr::rtio::o_we_write(1);
|
||||
if word != 0 {
|
||||
rtio_o_data_write(0, word);
|
||||
csr::rtio::o_we_write(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user