From d6e0e461c6afb94766393081e935f94ec46f6624 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 11 Sep 2023 15:02:35 +0800 Subject: [PATCH 1/2] fix zc706 compilation warning --- src/runtime/src/main.rs | 2 ++ src/runtime/src/rtio_acp.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/runtime/src/main.rs b/src/runtime/src/main.rs index 570c41a..bef85af 100644 --- a/src/runtime/src/main.rs +++ b/src/runtime/src/main.rs @@ -12,6 +12,7 @@ #[macro_use] extern crate alloc; +#[cfg(feature = "target_kasli_soc")] use core::cell::RefCell; use libasync::{block_async, task}; @@ -143,6 +144,7 @@ pub fn main_core0() { info!("gateware ident: {}", identifier_read(&mut [0; 64])); i2c::init(); + #[allow(unused)] let i2c_bus = unsafe { (i2c::I2C_BUS).as_mut().unwrap() }; #[cfg(feature = "target_kasli_soc")] diff --git a/src/runtime/src/rtio_acp.rs b/src/runtime/src/rtio_acp.rs index 5b90514..1b71590 100644 --- a/src/runtime/src/rtio_acp.rs +++ b/src/runtime/src/rtio_acp.rs @@ -11,6 +11,7 @@ pub const RTIO_O_STATUS_UNDERFLOW: i32 = 2; pub const RTIO_O_STATUS_DESTINATION_UNREACHABLE: i32 = 4; pub const RTIO_I_STATUS_WAIT_EVENT: i32 = 1; pub const RTIO_I_STATUS_OVERFLOW: i32 = 2; +#[allow(unused)] pub const RTIO_I_STATUS_WAIT_STATUS: i32 = 4; // TODO pub const RTIO_I_STATUS_DESTINATION_UNREACHABLE: i32 = 8; -- 2.42.0 From 34f936ac2e042e62304194f1d67da7b2d9678762 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 11 Sep 2023 15:13:04 +0800 Subject: [PATCH 2/2] gate i2c_bus behind target_kasli_soc cfg --- src/runtime/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/src/main.rs b/src/runtime/src/main.rs index bef85af..2c5910e 100644 --- a/src/runtime/src/main.rs +++ b/src/runtime/src/main.rs @@ -144,7 +144,7 @@ pub fn main_core0() { info!("gateware ident: {}", identifier_read(&mut [0; 64])); i2c::init(); - #[allow(unused)] + #[cfg(feature = "target_kasli_soc")] let i2c_bus = unsafe { (i2c::I2C_BUS).as_mut().unwrap() }; #[cfg(feature = "target_kasli_soc")] -- 2.42.0