mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add console management commands
This commit is contained in:
parent
dde6addc18
commit
5a10bb8fd8
1 changed files with 4 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ impl<'a> ShellCmdApi<'a> for Usb {
|
|||
Ok(xous::Result::Scalar1(result)) => {
|
||||
if result == 1 {
|
||||
write!(ret, "USB console connected.").ok();
|
||||
// this will enable input injection mode
|
||||
self.usb_dev.serial_console_input_injection();
|
||||
} else {
|
||||
write!(ret, "Error trying to connect USB console.").ok();
|
||||
}
|
||||
|
|
@ -85,6 +87,8 @@ impl<'a> ShellCmdApi<'a> for Usb {
|
|||
write!(ret, "Could not disconnect USB console").ok();
|
||||
}
|
||||
}
|
||||
// this will disable any hooks (including the console input hook)
|
||||
self.usb_dev.serial_clear_input_hooks();
|
||||
}
|
||||
"send" => {
|
||||
match self.usb_dev.get_current_core() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue