pub struct ConsoleDevice {
id: usize,
name: &'static str,
}
Expand description
Character device for xv6 console that bridges to TTY
Fields§
§id: usize
§name: &'static str
Implementations§
Source§impl ConsoleDevice
impl ConsoleDevice
Trait Implementations§
Source§impl CharDevice for ConsoleDevice
impl CharDevice for ConsoleDevice
Source§fn write_byte(&self, byte: u8) -> Result<(), &'static str>
fn write_byte(&self, byte: u8) -> Result<(), &'static str>
Write a single byte to the device Read more
Source§impl Device for ConsoleDevice
impl Device for ConsoleDevice
fn device_type(&self) -> DeviceType
fn name(&self) -> &'static str
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn as_char_device(&self) -> Option<&dyn CharDevice>
fn as_char_device(&self) -> Option<&dyn CharDevice>
Cast to CharDevice if this device is a character device
Source§fn as_block_device(&self) -> Option<&dyn BlockDevice>
fn as_block_device(&self) -> Option<&dyn BlockDevice>
Cast to BlockDevice if this device is a block device