pub struct SerialConsole { /* private fields */ }Expand description
Serial console driver
Implementations§
Source§impl SerialConsole
impl SerialConsole
Trait Implementations§
Source§impl ConsoleDevice for SerialConsole
impl ConsoleDevice for SerialConsole
Source§fn dimensions(&self) -> (usize, usize)
fn dimensions(&self) -> (usize, usize)
Get console dimensions
Source§fn clear(&mut self) -> Result<(), KernelError>
fn clear(&mut self) -> Result<(), KernelError>
Clear the screen
Source§fn write_char(
&mut self,
x: usize,
y: usize,
ch: ConsoleChar,
) -> Result<(), KernelError>
fn write_char( &mut self, x: usize, y: usize, ch: ConsoleChar, ) -> Result<(), KernelError>
Write a character at position
Source§fn write_string(
&mut self,
x: usize,
y: usize,
s: &str,
_color: u8,
) -> Result<(), KernelError>
fn write_string( &mut self, x: usize, y: usize, s: &str, _color: u8, ) -> Result<(), KernelError>
Write a string at position
Source§fn scroll_up(&mut self) -> Result<(), KernelError>
fn scroll_up(&mut self) -> Result<(), KernelError>
Scroll up by one line
Source§fn set_cursor(&mut self, x: usize, y: usize) -> Result<(), KernelError>
fn set_cursor(&mut self, x: usize, y: usize) -> Result<(), KernelError>
Set cursor position
Source§fn get_cursor(&self) -> (usize, usize)
fn get_cursor(&self) -> (usize, usize)
Get cursor position
Source§fn set_cursor_visible(&mut self, visible: bool) -> Result<(), KernelError>
fn set_cursor_visible(&mut self, visible: bool) -> Result<(), KernelError>
Show/hide cursor