diff --git a/src/libboard_artiq/src/cxp_proto.rs b/src/libboard_artiq/src/cxp_proto.rs index 9203226..5ae4df6 100644 --- a/src/libboard_artiq/src/cxp_proto.rs +++ b/src/libboard_artiq/src/cxp_proto.rs @@ -7,7 +7,7 @@ use io::Cursor; use libboard_zynq::println; use crate::{mem::mem::{CXP_LOOPBACK_MEM, CXP_RX_MEM, CXP_TX_MEM}, - pl::csr::CXP}; + pl::{csr, csr::CXP}}; const BUF_LEN: usize = 0x800; const DATA_MAXSIZE: usize = 48; @@ -448,7 +448,7 @@ impl UpConnPacket { } pub fn send(channel: usize, packet: &UpConnPacket) -> Result<(), Error> { - if unsafe { (CXP[channel].upconn_tx_enable_read)() } == 0 { + if unsafe { csr::cxp_phys::upconn_tx_enable_read() } == 0 { Err(Error::LinkDown)? } @@ -465,6 +465,8 @@ fn send_data_packet(channel: usize, packet: &UpConnPacket) -> Result<(), Error> let mut writer = Cursor::new(slice::from_raw_parts_mut(ptr as *mut u8, BUF_LEN)); packet.write_to(&mut writer)?; + println!("TX MEM after writing"); + print_packet(&writer.get_ref()[0..40]); (CXP[channel].upconn_bootstrap_tx_word_len_write)(writer.position() as u16 / 4); (CXP[channel].upconn_bootstrap_tx_write)(1);