1
0
Fork 0

fix build/warnings before drtio is fully merged

This commit is contained in:
mwojcik 2021-10-06 08:26:37 +02:00 committed by Gitea
parent e241957419
commit aaec0abdf6
4 changed files with 7 additions and 3 deletions

View File

@ -24,6 +24,7 @@ pub mod si5324;
pub mod drtioaux; pub mod drtioaux;
#[cfg(has_drtio)] #[cfg(has_drtio)]
pub mod drtioaux_async; pub mod drtioaux_async;
#[cfg(has_drtio)]
#[path = "../../../build/mem.rs"] #[path = "../../../build/mem.rs"]
pub mod mem; pub mod mem;

View File

@ -30,6 +30,7 @@ use crate::moninj;
use crate::mgmt; use crate::mgmt;
use crate::analyzer; use crate::analyzer;
use crate::rtio_mgt; use crate::rtio_mgt;
#[cfg(has_drtio)]
use crate::pl; use crate::pl;
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]

View File

@ -1,6 +1,6 @@
use core::{fmt, cell::RefCell}; use core::{fmt, cell::RefCell};
use alloc::{collections::BTreeMap, rc::Rc}; use alloc::{collections::BTreeMap, rc::Rc};
use log::{debug, info, warn, error}; use log::{debug, info, warn};
use void::Void; use void::Void;
use libboard_artiq::drtio_routing; use libboard_artiq::drtio_routing;
@ -60,6 +60,7 @@ mod remote_moninj {
use super::*; use super::*;
use libboard_artiq::drtioaux; use libboard_artiq::drtioaux;
use crate::rtio_mgt::drtio; 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 { 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 { let reply = task::block_on(drtio::aux_transact(aux_mutex, linkno, &drtioaux::Packet::MonitorRequest {
@ -151,7 +152,7 @@ macro_rules! dispatch {
macro_rules! dispatch { macro_rules! dispatch {
($timer:ident, $aux_mutex:ident, $routing_table:ident, $channel:expr, $func:ident $(, $param:expr)*) => {{ ($timer:ident, $aux_mutex:ident, $routing_table:ident, $channel:expr, $func:ident $(, $param:expr)*) => {{
let channel = $channel as u16; let channel = $channel as u16;
local_moninj::$func(channel, $($param, )*) local_moninj::$func(channel.into(), $($param, )*)
}} }}
} }

View File

@ -1,6 +1,6 @@
use core::cell::RefCell; use core::cell::RefCell;
use alloc::rc::Rc; use alloc::rc::Rc;
use libboard_zynq::{timer::GlobalTimer, time::Milliseconds}; use libboard_zynq::timer::GlobalTimer;
use libboard_artiq::{pl::csr, drtio_routing}; use libboard_artiq::{pl::csr, drtio_routing};
use libcortex_a9::mutex::Mutex; use libcortex_a9::mutex::Mutex;
@ -14,6 +14,7 @@ pub mod drtio {
use log::{warn, error, info}; use log::{warn, error, info};
use embedded_hal::blocking::delay::DelayMs; use embedded_hal::blocking::delay::DelayMs;
use libasync::{task, delay}; use libasync::{task, delay};
use libboard_zynq::time::Milliseconds;
pub fn startup(aux_mutex: &Rc<Mutex<bool>>, pub fn startup(aux_mutex: &Rc<Mutex<bool>>,
routing_table: &Rc<RefCell<drtio_routing::RoutingTable>>, routing_table: &Rc<RefCell<drtio_routing::RoutingTable>>,