forked from M-Labs/artiq-zynq
upconn FW: update csr
This commit is contained in:
parent
0d04a3400c
commit
4250a1b432
@ -32,8 +32,8 @@ pub fn tx_test(channel: u8, timer: &mut GlobalTimer) {
|
||||
timer.delay_us(1);
|
||||
|
||||
// DEBUG: send ctrl packet or test
|
||||
(CXP[channel].tx_bootstrap_tx_write)(1);
|
||||
(CXP[channel].tx_bootstrap_tx_testseq_write)(1);
|
||||
(CXP[channel].tx_writer_stb_write)(1);
|
||||
(CXP[channel].tx_writer_stb_testseq_write)(1);
|
||||
|
||||
// DEBUG: Trigger packet (NOTE: disconnected in Gateware)
|
||||
// (CXP[channel].upconn_trig_stb_write)(1); // send trig
|
||||
@ -77,7 +77,7 @@ pub fn tx_test(channel: u8, timer: &mut GlobalTimer) {
|
||||
fn preload_tx_packet(channel: u8, packet: &cxp_proto::TXPacket) {
|
||||
let channel = channel as usize;
|
||||
unsafe {
|
||||
while (CXP[channel].tx_bootstrap_tx_busy_read)() == 1 {}
|
||||
while (CXP[channel].tx_writer_busy_read)() == 1 {}
|
||||
let ptr = CXP_MEM[channel].base as *mut u32;
|
||||
let mut writer = Cursor::new(slice::from_raw_parts_mut(ptr as *mut u8, BUF_LEN));
|
||||
|
||||
@ -86,6 +86,6 @@ fn preload_tx_packet(channel: u8, packet: &cxp_proto::TXPacket) {
|
||||
println!("TX MEM after writing");
|
||||
cxp_proto::print_packet(&writer.get_ref()[0..40]);
|
||||
|
||||
(CXP[channel].tx_bootstrap_tx_word_len_write)(writer.position() as u16 / 4);
|
||||
(CXP[channel].tx_writer_word_len_write)(writer.position() as u16 / 4);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user