Merge branch 'post-06-new' into post-07-new-rebased

This commit is contained in:
Philipp Oppermann
2019-04-26 15:24:28 +02:00
18 changed files with 289 additions and 286 deletions

View File

@@ -4,7 +4,7 @@ use uart_16550::SerialPort;
lazy_static! {
pub static ref SERIAL1: Mutex<SerialPort> = {
let mut serial_port = SerialPort::new(0x3F8);
let mut serial_port = unsafe { SerialPort::new(0x3F8) };
serial_port.init();
Mutex::new(serial_port)
};
@@ -36,5 +36,6 @@ macro_rules! serial_print {
macro_rules! serial_println {
() => ($crate::serial_print!("\n"));
($fmt:expr) => ($crate::serial_print!(concat!($fmt, "\n")));
($fmt:expr, $($arg:tt)*) => ($crate::serial_print!(concat!($fmt, "\n"), $($arg)*));
($fmt:expr, $($arg:tt)*) => ($crate::serial_print!(
concat!($fmt, "\n"), $($arg)*));
}