From aaec0abdf68334609cbb3a784999b2ce6489b6fd Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 08:26:37 +0200 Subject: [PATCH] fix build/warnings before drtio is fully merged --- src/libboard_artiq/src/lib.rs | 1 + src/runtime/src/comms.rs | 1 + src/runtime/src/moninj.rs | 5 +++-- src/runtime/src/rtio_mgt.rs | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libboard_artiq/src/lib.rs b/src/libboard_artiq/src/lib.rs index c1b1a51..b85481c 100644 --- a/src/libboard_artiq/src/lib.rs +++ b/src/libboard_artiq/src/lib.rs @@ -24,6 +24,7 @@ pub mod si5324; pub mod drtioaux; #[cfg(has_drtio)] pub mod drtioaux_async; +#[cfg(has_drtio)] #[path = "../../../build/mem.rs"] pub mod mem; diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 63f0b63..f90b6de 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -30,6 +30,7 @@ use crate::moninj; use crate::mgmt; use crate::analyzer; use crate::rtio_mgt; +#[cfg(has_drtio)] use crate::pl; #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/src/runtime/src/moninj.rs b/src/runtime/src/moninj.rs index ab09c70..77b7942 100644 --- a/src/runtime/src/moninj.rs +++ b/src/runtime/src/moninj.rs @@ -1,6 +1,6 @@ use core::{fmt, cell::RefCell}; use alloc::{collections::BTreeMap, rc::Rc}; -use log::{debug, info, warn, error}; +use log::{debug, info, warn}; use void::Void; use libboard_artiq::drtio_routing; @@ -60,6 +60,7 @@ mod remote_moninj { use super::*; use libboard_artiq::drtioaux; use crate::rtio_mgt::drtio; + use log::error; pub fn read_probe(aux_mutex: &Rc>, timer: GlobalTimer, linkno: u8, destination: u8, channel: i32, probe: i8) -> i32 { let reply = task::block_on(drtio::aux_transact(aux_mutex, linkno, &drtioaux::Packet::MonitorRequest { @@ -151,7 +152,7 @@ macro_rules! dispatch { macro_rules! dispatch { ($timer:ident, $aux_mutex:ident, $routing_table:ident, $channel:expr, $func:ident $(, $param:expr)*) => {{ let channel = $channel as u16; - local_moninj::$func(channel, $($param, )*) + local_moninj::$func(channel.into(), $($param, )*) }} } diff --git a/src/runtime/src/rtio_mgt.rs b/src/runtime/src/rtio_mgt.rs index dd39f3a..d72a902 100644 --- a/src/runtime/src/rtio_mgt.rs +++ b/src/runtime/src/rtio_mgt.rs @@ -1,6 +1,6 @@ use core::cell::RefCell; use alloc::rc::Rc; -use libboard_zynq::{timer::GlobalTimer, time::Milliseconds}; +use libboard_zynq::timer::GlobalTimer; use libboard_artiq::{pl::csr, drtio_routing}; use libcortex_a9::mutex::Mutex; @@ -14,6 +14,7 @@ pub mod drtio { use log::{warn, error, info}; use embedded_hal::blocking::delay::DelayMs; use libasync::{task, delay}; + use libboard_zynq::time::Milliseconds; pub fn startup(aux_mutex: &Rc>, routing_table: &Rc>,