1
0
Fork 0

cxp upconn fw: add clk reset & busy csr

This commit is contained in:
morgan 2024-08-30 18:07:54 +08:00
parent 535b79cfd4
commit 0b2f201c09
1 changed files with 6 additions and 1 deletions

View File

@ -57,7 +57,9 @@ pub fn tx_test(timer: &mut GlobalTimer) {
let mut arr: [u16; LEN] = [0; LEN];
unsafe {
csr::cxp::upconn_clk_reset_write(1);
// csr::cxp::upconn_bitrate2x_enable_write(1);
csr::cxp::upconn_clk_reset_write(0);
loop {
// TODO: verify the char & word boundary thingy
@ -74,6 +76,9 @@ pub fn tx_test(timer: &mut GlobalTimer) {
for i in 0..LEN {
arr[i] = get_encoded();
// if csr::cxp::upconn_tx_busy_read() == 0 {
// break;
// };
}
let mut last_encoded: u16 = 0;
for i in 0..LEN {
@ -89,7 +94,7 @@ pub fn tx_test(timer: &mut GlobalTimer) {
println!("D04.4")
}
0b0011111010 | 0b1100000101 => {
println!("K28.5 start idling....")
println!("K28.5 start idling...")
}
0b0011111001 | 0b1100000110 => {
println!("K28.1 idling...")