release-7: fix zc706 master and standalone compilation warning #273

Merged
sb10q merged 2 commits from morgan/artiq-zynq:zc706_warning_fix into release-7 2023-11-01 17:45:18 +08:00
2 changed files with 3 additions and 0 deletions
Showing only changes of commit f6c3d216ba - Show all commits

View File

@ -11,6 +11,7 @@
extern crate alloc; extern crate alloc;
#[cfg(feature = "target_kasli_soc")]
use core::cell::RefCell; use core::cell::RefCell;
use log::{info, warn, error}; use log::{info, warn, error};
@ -148,6 +149,7 @@ pub fn main_core0() {
info!("gateware ident: {}", identifier_read(&mut [0; 64])); info!("gateware ident: {}", identifier_read(&mut [0; 64]));
i2c::init(); i2c::init();
#[cfg(feature = "target_kasli_soc")]
let i2c_bus = unsafe { (i2c::I2C_BUS).as_mut().unwrap() }; let i2c_bus = unsafe { (i2c::I2C_BUS).as_mut().unwrap() };
morgan marked this conversation as resolved Outdated

Maybe just move it and task::spawn of io_expander_service to the block with io expander settings?

Maybe just move it and task::spawn of io_expander_service to the block with io expander settings?
#[cfg(feature = "target_kasli_soc")] #[cfg(feature = "target_kasli_soc")]

View File

@ -11,6 +11,7 @@ pub const RTIO_O_STATUS_UNDERFLOW: i32 = 2;
pub const RTIO_O_STATUS_DESTINATION_UNREACHABLE: i32 = 4; pub const RTIO_O_STATUS_DESTINATION_UNREACHABLE: i32 = 4;
pub const RTIO_I_STATUS_WAIT_EVENT: i32 = 1; pub const RTIO_I_STATUS_WAIT_EVENT: i32 = 1;
pub const RTIO_I_STATUS_OVERFLOW: i32 = 2; 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_WAIT_STATUS: i32 = 4; // TODO
pub const RTIO_I_STATUS_DESTINATION_UNREACHABLE: i32 = 8; pub const RTIO_I_STATUS_DESTINATION_UNREACHABLE: i32 = 8;