forked from M-Labs/artiq-zynq
cxp upconn fw: add clk reset & busy csr
This commit is contained in:
parent
535b79cfd4
commit
0b2f201c09
|
@ -57,7 +57,9 @@ pub fn tx_test(timer: &mut GlobalTimer) {
|
||||||
let mut arr: [u16; LEN] = [0; LEN];
|
let mut arr: [u16; LEN] = [0; LEN];
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
csr::cxp::upconn_clk_reset_write(1);
|
||||||
// csr::cxp::upconn_bitrate2x_enable_write(1);
|
// csr::cxp::upconn_bitrate2x_enable_write(1);
|
||||||
|
csr::cxp::upconn_clk_reset_write(0);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
// TODO: verify the char & word boundary thingy
|
// TODO: verify the char & word boundary thingy
|
||||||
|
@ -74,6 +76,9 @@ pub fn tx_test(timer: &mut GlobalTimer) {
|
||||||
|
|
||||||
for i in 0..LEN {
|
for i in 0..LEN {
|
||||||
arr[i] = get_encoded();
|
arr[i] = get_encoded();
|
||||||
|
// if csr::cxp::upconn_tx_busy_read() == 0 {
|
||||||
|
// break;
|
||||||
|
// };
|
||||||
}
|
}
|
||||||
let mut last_encoded: u16 = 0;
|
let mut last_encoded: u16 = 0;
|
||||||
for i in 0..LEN {
|
for i in 0..LEN {
|
||||||
|
@ -89,7 +94,7 @@ pub fn tx_test(timer: &mut GlobalTimer) {
|
||||||
println!("D04.4")
|
println!("D04.4")
|
||||||
}
|
}
|
||||||
0b0011111010 | 0b1100000101 => {
|
0b0011111010 | 0b1100000101 => {
|
||||||
println!("K28.5 start idling....")
|
println!("K28.5 start idling...")
|
||||||
}
|
}
|
||||||
0b0011111001 | 0b1100000110 => {
|
0b0011111001 | 0b1100000110 => {
|
||||||
println!("K28.1 idling...")
|
println!("K28.1 idling...")
|
||||||
|
|
Loading…
Reference in New Issue