api: update csr

This commit is contained in:
morgan 2025-01-14 14:22:48 +08:00
parent 5a9091b34f
commit 09d2ccf99f

View File

@ -69,11 +69,11 @@ pub extern "C" fn cxp_debug_frame_print() {
} }
} }
// let channel: usize = 0; // let channel: usize = 0;
// while (CXP[channel].downconn_debug_out_dout_valid_read)() == 1 { // while (CXP[channel].rx_debug_out_dout_valid_read)() == 1 {
// pak_arr[i] = (CXP[channel].downconn_debug_out_dout_pak_read)(); // pak_arr[i] = (CXP[channel].rx_debug_out_dout_pak_read)();
// k_arr[i] = (CXP[channel].downconn_debug_out_kout_pak_read)(); // k_arr[i] = (CXP[channel].rx_debug_out_kout_pak_read)();
// // println!("received {:#04X}", pak_arr[i]); // // println!("received {:#04X}", pak_arr[i]);
// (CXP[channel].downconn_debug_out_inc_write)(1); // (CXP[channel].rx_debug_out_inc_write)(1);
// i += 1; // i += 1;
// if i == LEN { // if i == LEN {
// break; // break;
@ -81,15 +81,12 @@ pub extern "C" fn cxp_debug_frame_print() {
// } // }
println!( println!(
"Decode error = {}", "Decode error = {}",
(CXP[MASTER_CHANNEL as usize].downconn_bootstrap_decoder_err_read)() (CXP[MASTER_CHANNEL as usize].rx_bootstrap_decoder_err_read)()
); );
println!( println!("Trigger ack = {}", (CXP[MASTER_CHANNEL as usize].rx_trigger_ack_read)());
"Trigger ack = {}", if (CXP[MASTER_CHANNEL as usize].rx_trigger_ack_read)() == 1 {
(CXP[MASTER_CHANNEL as usize].downconn_trigger_ack_read)()
);
if (CXP[MASTER_CHANNEL as usize].downconn_trigger_ack_read)() == 1 {
println!("Trigger ack clear"); println!("Trigger ack clear");
(CXP[MASTER_CHANNEL as usize].downconn_trigger_ack_write)(1); (CXP[MASTER_CHANNEL as usize].rx_trigger_ack_write)(1);
}; };
} }
cxp_ctrl::print_decode_error(MASTER_CHANNEL); cxp_ctrl::print_decode_error(MASTER_CHANNEL);