make build BOARD=k210 sucessfully
This commit is contained in:
parent
8e6f364ecc
commit
e7d6406f45
8 changed files with 96 additions and 9 deletions
|
@ -1,17 +1,17 @@
|
|||
mod ns16550a;
|
||||
|
||||
pub use ns16550a::NS16550a;
|
||||
|
||||
#[cfg(feature = "board_qemu")]
|
||||
use crate::board::CharDeviceImpl;
|
||||
use alloc::sync::Arc;
|
||||
use lazy_static::*;
|
||||
pub use ns16550a::NS16550a;
|
||||
|
||||
pub trait CharDevice {
|
||||
fn read(&self) -> u8;
|
||||
fn write(&self, ch: u8);
|
||||
fn handle_irq(&self);
|
||||
}
|
||||
|
||||
#[cfg(feature = "board_qemu")]
|
||||
lazy_static! {
|
||||
pub static ref UART: Arc<CharDeviceImpl> = Arc::new(CharDeviceImpl::new());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue