Added MapType::Linear for framebuffer mapping & cargo fmt
This commit is contained in:
parent
4022cc3ed7
commit
4430e86d5a
12 changed files with 47 additions and 65 deletions
|
@ -143,12 +143,13 @@ impl<const BASE_ADDR: usize> NS16550a<BASE_ADDR> {
|
|||
}
|
||||
|
||||
pub fn read_buffer_is_empty(&self) -> bool {
|
||||
self.inner.exclusive_session(|inner| inner.read_buffer.is_empty())
|
||||
self.inner
|
||||
.exclusive_session(|inner| inner.read_buffer.is_empty())
|
||||
}
|
||||
}
|
||||
|
||||
impl<const BASE_ADDR: usize> CharDevice for NS16550a<BASE_ADDR> {
|
||||
fn init(&self){
|
||||
fn init(&self) {
|
||||
let mut inner = self.inner.exclusive_access();
|
||||
inner.ns16550a.init();
|
||||
drop(inner);
|
||||
|
|
|
@ -18,7 +18,7 @@ struct VirtIOInputWrapper {
|
|||
inner: UPIntrFreeCell<VirtIOInputInner>,
|
||||
//condvars: BTreeMap<u16, Condvar>,
|
||||
//condvar: Arc::<Condvar> ,
|
||||
condvar:Condvar,
|
||||
condvar: Condvar,
|
||||
}
|
||||
|
||||
pub trait InputDevice: Send + Sync + Any {
|
||||
|
@ -38,7 +38,7 @@ lazy_static::lazy_static!(
|
|||
//const QUEUE_SIZE: u16 = 32;
|
||||
// pub fn read_input_event() -> u64 {
|
||||
// loop {
|
||||
|
||||
|
||||
// //let mut inner = self.inner.exclusive_access();
|
||||
// let kb=KEYBOARD_DEVICE.clone();
|
||||
// let evs = kb.events();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue