1
0
Fork 0

proto fw: remove downconn debug

This commit is contained in:
morgan 2024-09-16 12:39:57 +08:00
parent 9a06848cbb
commit 9ecc3cebb6
1 changed files with 0 additions and 24 deletions

View File

@ -209,30 +209,6 @@ pub fn print_packetu32(pak: &[u32]) {
println!("============================================");
}
pub fn downconn_debug_main() {
downconn_debug_send(&Packet::CtrlRead {
addr: 0x00,
length: 0x04,
});
const LEN: usize = 40;
let mut pak_arr: [u32; LEN] = [0; LEN];
let mut i: usize = 0;
unsafe {
while csr::cxp::downconn_debug_out_dout_valid_read() == 1 {
pak_arr[i] = csr::cxp::downconn_debug_out_dout_pak_read();
// println!("received {:#04X}", pak_arr[i]);
csr::cxp::downconn_debug_out_inc_write(1);
i += 1;
if i == LEN {
break;
}
}
}
print_packetu32(&pak_arr)
}
pub fn downconn_debug_send(packet: &Packet) -> Result<(), Error> {
let mut buffer: [u8; MAX_PACKET] = [0; MAX_PACKET];
let mut writer = Cursor::new(&mut buffer[..]);