diff --git a/src/device/tty.rs b/src/device/tty.rs index 158fc04d..bd892269 100644 --- a/src/device/tty.rs +++ b/src/device/tty.rs @@ -93,6 +93,7 @@ pub mod combined { self.set_signal_group(id as _); Ok(()) } + DeviceRequest::ConfigureTerminal(config) => self.context.set_config(config), _ => Err(Error::InvalidArgument), } } @@ -286,6 +287,11 @@ impl TtyContext { pub async fn getc(&self) -> u8 { self.ring.read().await } + + pub fn set_config(&self, config: &TerminalOptions) -> Result<(), Error> { + self.inner.lock().config = config.clone(); + Ok(()) + } } // impl CharRingInner {