fix(coding style)
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
parent
b9557bdc5e
commit
eab6ddeb8d
@ -1,8 +1,8 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
mod vga;
|
||||
mod serial;
|
||||
mod vga;
|
||||
use core::panic::PanicInfo;
|
||||
use vga::Color;
|
||||
|
||||
@ -15,8 +15,7 @@ fn panic_handler(info: &PanicInfo) -> ! {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn julios_main() -> ! {
|
||||
println!("Hello World!");
|
||||
println!("{}", "***JuliOS***");
|
||||
serial_println!("Test serial");
|
||||
println!("***JuliOS***");
|
||||
serial_println!("Hello serial");
|
||||
panic!("Kernel end of flow");
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use core::fmt;
|
||||
use spin::Mutex;
|
||||
use lazy_static::lazy_static;
|
||||
use spin::Mutex;
|
||||
use x86_64::instructions::port::Port;
|
||||
|
||||
const COM1: u16 = 0x3f8;
|
||||
@ -22,7 +22,10 @@ lazy_static! {
|
||||
#[doc(hidden)]
|
||||
pub fn _print(args: ::core::fmt::Arguments) {
|
||||
use core::fmt::Write;
|
||||
SERIAL1.lock().write_fmt(args).expect("Printing to serial failed");
|
||||
SERIAL1
|
||||
.lock()
|
||||
.write_fmt(args)
|
||||
.expect("Printing to serial failed");
|
||||
}
|
||||
|
||||
/// Prints to the host through the serial interface.
|
||||
@ -49,7 +52,7 @@ pub struct SerialPort {
|
||||
impl SerialPort {
|
||||
pub fn new(port: u16) -> SerialPort {
|
||||
SerialPort {
|
||||
base: Port::new(port)
|
||||
base: Port::new(port),
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,8 +68,7 @@ impl SerialPort {
|
||||
}
|
||||
}
|
||||
|
||||
fn init(&mut self) {
|
||||
}
|
||||
fn init(&mut self) {}
|
||||
}
|
||||
|
||||
impl fmt::Write for SerialPort {
|
||||
|
Loading…
Reference in New Issue
Block a user