pub struct TtyDevice {
name: &'static str,
uart_device_id: usize,
input_buffer: Arc<Mutex<VecDeque<u8>>>,
input_waker: Waker,
canonical_mode: bool,
echo_enabled: bool,
}
Expand description
TTY device implementation.
This device provides terminal functionality including line discipline, echo, and basic terminal I/O operations.
Fields§
§name: &'static str
§uart_device_id: usize
§input_buffer: Arc<Mutex<VecDeque<u8>>>
§input_waker: Waker
§canonical_mode: bool
§echo_enabled: bool
Implementations§
Source§impl TtyDevice
impl TtyDevice
pub fn new(name: &'static str, uart_device_id: usize) -> Self
Sourcefn handle_input_byte(&self, byte: u8)
fn handle_input_byte(&self, byte: u8)
Handle input byte from UART device.
This method processes incoming bytes and applies line discipline.
Sourcefn echo_backspace(&self)
fn echo_backspace(&self)
Echo backspace sequence.
Trait Implementations§
Source§impl CharDevice for TtyDevice
impl CharDevice for TtyDevice
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 TtyDevice
impl Device for TtyDevice
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