Warnings removal
This commit is contained in:
parent
543ef3d96f
commit
53c71d9183
|
@ -40,6 +40,7 @@ bitflags! {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Command {
|
enum Command {
|
||||||
ReadConfig = 0x20,
|
ReadConfig = 0x20,
|
||||||
WriteConfig = 0x60,
|
WriteConfig = 0x60,
|
||||||
|
@ -55,6 +56,7 @@ enum Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum KeyboardCommand {
|
enum KeyboardCommand {
|
||||||
EnableReporting = 0xF4,
|
EnableReporting = 0xF4,
|
||||||
SetDefaults = 0xF6,
|
SetDefaults = 0xF6,
|
||||||
|
@ -62,6 +64,7 @@ enum KeyboardCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum MouseCommand {
|
enum MouseCommand {
|
||||||
GetDeviceId = 0xF2,
|
GetDeviceId = 0xF2,
|
||||||
EnableReporting = 0xF4,
|
EnableReporting = 0xF4,
|
||||||
|
@ -282,7 +285,7 @@ impl Ps2 {
|
||||||
dy -= 0x100;
|
dy -= 0x100;
|
||||||
}
|
}
|
||||||
|
|
||||||
let extra = if self.mouse_extra {
|
let _extra = if self.mouse_extra {
|
||||||
self.mouse[3]
|
self.mouse[3]
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
|
|
|
@ -32,6 +32,7 @@ bitflags! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct SerialPort {
|
pub struct SerialPort {
|
||||||
/// Data register, read to receive, write to send
|
/// Data register, read to receive, write to send
|
||||||
data: Pio<u8>,
|
data: Pio<u8>,
|
||||||
|
@ -62,10 +63,6 @@ impl SerialPort {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn int_en(&self) -> IntEnFlags {
|
|
||||||
IntEnFlags::from_bits_truncate(self.int_en.read())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn line_sts(&self) -> LineStsFlags {
|
fn line_sts(&self) -> LineStsFlags {
|
||||||
LineStsFlags::from_bits_truncate(self.line_sts.read())
|
LineStsFlags::from_bits_truncate(self.line_sts.read())
|
||||||
}
|
}
|
||||||
|
@ -76,6 +73,7 @@ impl SerialPort {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init(&mut self) {
|
fn init(&mut self) {
|
||||||
|
//TODO: Cleanup
|
||||||
self.int_en.write(0x00);
|
self.int_en.write(0x00);
|
||||||
self.line_ctrl.write(0x80);
|
self.line_ctrl.write(0x80);
|
||||||
self.data.write(0x03);
|
self.data.write(0x03);
|
||||||
|
@ -88,7 +86,7 @@ impl SerialPort {
|
||||||
|
|
||||||
pub fn on_receive(&mut self) {
|
pub fn on_receive(&mut self) {
|
||||||
let data = self.data.read();
|
let data = self.data.read();
|
||||||
write!(self, "SERIAL {:X}\n", data);
|
let _ = write!(self, "SERIAL {:X}\n", data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +109,6 @@ pub struct SerialConsole;
|
||||||
|
|
||||||
impl Write for SerialConsole {
|
impl Write for SerialConsole {
|
||||||
fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> {
|
fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> {
|
||||||
COM1.lock().write_str(s);
|
COM1.lock().write_str(s)
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ interrupt!(pit, {
|
||||||
let low = io::inb(0x40);
|
let low = io::inb(0x40);
|
||||||
let high = io::inb(0x40);
|
let high = io::inb(0x40);
|
||||||
let count = (high as u16) << 8 | (low as u16);
|
let count = (high as u16) << 8 | (low as u16);
|
||||||
let missed = 5370 - count;
|
let _missed = 5370 - count;
|
||||||
master_ack();
|
master_ack();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,6 @@ pub unsafe extern fn kstart_ap(stack_start: usize, stack_end: usize) -> ! {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref mut display) = *device::display::DISPLAY.lock() {
|
if let Some(ref mut display) = *device::display::DISPLAY.lock() {
|
||||||
let width = display.width;
|
|
||||||
display.char(0, ap_number * 16, (ap_number as u8 + b'0') as char, 0xFF00);
|
display.char(0, ap_number * 16, (ap_number as u8 + b'0') as char, 0xFF00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ pub extern fn kmain() {
|
||||||
|
|
||||||
print!("{}", format!("BSP: {:?}\n", syscall::getpid()));
|
print!("{}", format!("BSP: {:?}\n", syscall::getpid()));
|
||||||
|
|
||||||
if let Ok(context_lock) = context::contexts_mut().spawn(context_test) {
|
if let Ok(_context_lock) = context::contexts_mut().spawn(context_test) {
|
||||||
print!("Spawned context\n");
|
print!("Spawned context\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue