Browse Source

fix build/warnings before drtio is fully merged

exception
mwojcik 1 year ago committed by Gitea
parent
commit
aaec0abdf6
  1. 1
      src/libboard_artiq/src/lib.rs
  2. 1
      src/runtime/src/comms.rs
  3. 5
      src/runtime/src/moninj.rs
  4. 3
      src/runtime/src/rtio_mgt.rs

1
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;

1
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)]

5
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<Mutex<bool>>, 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, )*)
}}
}

3
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<Mutex<bool>>,
routing_table: &Rc<RefCell<drtio_routing::RoutingTable>>,

Loading…
Cancel
Save