satman analyzer: remove forgotten comment

pull/2090/head
mwojcik 2023-05-19 11:26:13 +08:00 committed by Sébastien Bourdeauducq
parent ab52748cac
commit c1d6fd4bbe
1 changed files with 0 additions and 40 deletions

View File

@ -103,43 +103,3 @@ impl Analyzer {
}
}
}
// pub fn send() -> Result<(), drtioaux::Error<!>> {
// let data = unsafe { &BUFFER.data[..] };
// let overflow_occurred = unsafe { csr::rtio_analyzer::message_encoder_overflow_read() != 0 };
// let total_byte_count = unsafe { csr::rtio_analyzer::dma_byte_count_read() };
// let pointer = (total_byte_count % BUFFER_SIZE as u64) as usize;
// let wraparound = total_byte_count >= BUFFER_SIZE as u64;
// let sent_bytes = if wraparound { BUFFER_SIZE } else { total_byte_count as usize };
// drtioaux::send(0, &drtioaux::Packet::AnalyzerHeader {
// total_byte_count: total_byte_count,
// sent_bytes: sent_bytes as u32,
// overflow_occurred: overflow_occurred,
// })?;
// info!("header sent, total bytes: {}; sent: {}, overflow: {}", total_byte_count, sent_bytes, overflow_occurred);
// let mut i = if wraparound { pointer } else { 0 };
// while i < sent_bytes {
// let mut data_slice: [u8; ANALYZER_MAX_SIZE] = [0; ANALYZER_MAX_SIZE];
// let len: usize = if i + ANALYZER_MAX_SIZE < sent_bytes { ANALYZER_MAX_SIZE } else { sent_bytes - i } as usize;
// let last = i + len == sent_bytes;
// if i + len >= BUFFER_SIZE {
// data_slice[..len].clone_from_slice(&data[i..BUFFER_SIZE]);
// data_slice[..len].clone_from_slice(&data[..(i+len) % BUFFER_SIZE]);
// } else {
// data_slice[..len].clone_from_slice(&data[i..i+len]);
// }
// i += len;
// drtioaux::send(0, &drtioaux::Packet::AnalyzerData {
// last: last,
// length: len as u16,
// data: data_slice,
// })?;
// //info!("sent data, last: {}, length: {}", last, len);
// }
// Ok(())
// }