diff --git a/src/libboard_artiq/src/cxp_phys.rs b/src/libboard_artiq/src/cxp_phys.rs index 0d11440..27d662c 100644 --- a/src/libboard_artiq/src/cxp_phys.rs +++ b/src/libboard_artiq/src/cxp_phys.rs @@ -19,23 +19,23 @@ pub enum CXP_SPEED { } pub fn setup(timer: &mut GlobalTimer) { - down_conn::setup(timer); - up_conn::setup(); + rx::setup(timer); + tx::setup(); change_linerate(CXP_SPEED::CXP_1); } pub fn change_linerate(speed: CXP_SPEED) { info!("Changing all channels datarate to {:?}", speed); - down_conn::change_linerate(speed); - up_conn::change_linerate(speed); + rx::change_linerate(speed); + tx::change_linerate(speed); } -mod up_conn { +mod tx { use super::*; pub fn setup() { unsafe { - csr::cxp_phys::upconn_tx_enable_write(1); + csr::cxp_phys::tx_enable_write(1); } } @@ -43,18 +43,18 @@ mod up_conn { unsafe { match speed { CXP_SPEED::CXP_1 | CXP_SPEED::CXP_2 | CXP_SPEED::CXP_3 | CXP_SPEED::CXP_5 | CXP_SPEED::CXP_6 => { - csr::cxp_phys::upconn_bitrate2x_enable_write(0); + csr::cxp_phys::tx_bitrate2x_enable_write(0); } CXP_SPEED::CXP_10 | CXP_SPEED::CXP_12 => { - csr::cxp_phys::upconn_bitrate2x_enable_write(1); + csr::cxp_phys::tx_bitrate2x_enable_write(1); } }; - csr::cxp_phys::upconn_clk_reset_write(1); + csr::cxp_phys::tx_clk_reset_write(1); } } } -mod down_conn { +mod rx { use super::*; pub fn setup(timer: &mut GlobalTimer) {