add mbox module; add swapper dependency

swapper dependency is needed because we need to allocate
some device RAM
This commit is contained in:
bunnie 2024-06-19 21:34:03 +08:00
parent d75624cfe4
commit ec4752d228
2 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,7 @@ usb-device-xous = { path = "../usb-device-xous", default-features = false }
cramium-hal = { path = "../../libs/cramium-hal", features = ["std"] }
cram-hal-service = { path = "../cram-hal-service" }
ime-plugin-shell = { path = "../ime-plugin-shell" }
xous-swapper = { path = "../xous-swapper" }
[features]
"cramium-fpga" = ["utralib/cramium-fpga", "xous-pl230/cramium-fpga"]

View file

@ -92,6 +92,8 @@ mod pddb_cmd;
use pddb_cmd::*;
mod usb;
use usb::*;
mod mbox;
use mbox::*;
pub struct CmdEnv {
common_env: CommonEnv,
@ -101,6 +103,7 @@ pub struct CmdEnv {
#[cfg(feature = "pddb")]
pddb_cmd: PddbCmd,
usb_cmd: Usb,
mbox: Mbox,
}
impl CmdEnv {
pub fn new(xns: &xous_names::XousNames) -> CmdEnv {
@ -130,6 +133,7 @@ impl CmdEnv {
log::debug!("usb");
Usb::new()
},
mbox: Mbox::new(),
}
}
@ -152,6 +156,7 @@ impl CmdEnv {
#[cfg(feature = "pddb")]
&mut self.pddb_cmd,
&mut self.usb_cmd,
&mut self.mbox,
];
if let Some(cmdline) = maybe_cmdline {