2021-03-10 17:45:02 +00:00
|
|
|
use crate::{ShellCmdApi, CommonEnv};
|
2021-03-26 12:22:33 +00:00
|
|
|
use xous_ipc::String;
|
2021-03-09 20:18:57 +00:00
|
|
|
|
2021-03-10 17:45:02 +00:00
|
|
|
#[derive(Debug)]
|
2021-03-09 20:18:57 +00:00
|
|
|
pub struct Echo {
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-10 14:59:52 +00:00
|
|
|
impl<'a> ShellCmdApi<'a> for Echo {
|
2021-03-11 14:31:38 +00:00
|
|
|
cmd_api!(echo); // inserts boilerplate for command API
|
2021-03-09 20:18:57 +00:00
|
|
|
|
2021-03-11 14:54:24 +00:00
|
|
|
fn process(&mut self, args: String::<1024>, _env: &mut CommonEnv) -> Result<Option<String::<1024>>, xous::Error> {
|
|
|
|
|
Ok(Some(args))
|
2021-03-09 20:18:57 +00:00
|
|
|
}
|
2021-03-26 12:22:33 +00:00
|
|
|
}
|