os/drivers/chardev/mod.rs
1mod ns16550a;
2
3use crate::board::CharDeviceImpl;
4use alloc::sync::Arc;
5use lazy_static::*;
6pub use ns16550a::NS16550a;
7
8pub trait CharDevice {
9 fn init(&self);
10 fn read(&self) -> u8;
11 fn write(&self, ch: u8);
12 fn handle_irq(&self);
13}
14
15lazy_static! {
16 pub static ref UART: Arc<CharDeviceImpl> = Arc::new(CharDeviceImpl::new());
17}