Redefine the TTY driver interface

This commit is contained in:
Ruihan Li
2025-05-03 23:31:54 +08:00
committed by Tate, Hongliang Tian
parent 5a9a63e1a7
commit 67065835ef
17 changed files with 469 additions and 523 deletions

View File

@ -12,7 +12,7 @@ use ostd::Pod;
use crate::transport::{ConfigManager, VirtioTransport};
pub static DEVICE_NAME: &str = "Virtio-Block";
pub const DEVICE_NAME: &str = "Virtio-Block";
bitflags! {
/// features for virtio block device

View File

@ -3,4 +3,4 @@
pub mod config;
pub mod device;
pub static DEVICE_NAME: &str = "Virtio-Console";
pub const DEVICE_NAME: &str = "Virtio-Console";

View File

@ -32,7 +32,7 @@ use ostd::{io::IoMem, Pod};
use crate::transport::VirtioTransport;
pub static DEVICE_NAME: &str = "Virtio-Input";
pub const DEVICE_NAME: &str = "Virtio-Input";
/// Select value used for [`device::InputDevice::query_config_select()`].
#[repr(u8)]

View File

@ -4,4 +4,4 @@ pub mod config;
pub mod device;
pub mod header;
pub static DEVICE_NAME: &str = "Virtio-Net";
pub const DEVICE_NAME: &str = "Virtio-Net";

View File

@ -14,7 +14,8 @@ pub mod device;
pub mod error;
pub mod header;
pub static DEVICE_NAME: &str = "Virtio-Vsock";
pub const DEVICE_NAME: &str = "Virtio-Vsock";
pub trait VsockDeviceIrqHandler = Fn() + Send + Sync + 'static;
pub fn register_device(name: String, device: Arc<SpinLock<SocketDevice>>) {