pub struct Serial
{
port: uart_16550::MmioSerialPort,
}
impl Serial
{
pub fn new(address: usize) -> Serial
{
unsafe {
Serial {
port: uart_16550::MmioSerialPort::new(address),
}
}
}
pub fn initialise(&self) {}
}
use core::fmt;
impl fmt::Write for Serial
{
fn write_str(&mut self, s: &str) -> fmt::Result
{
self.port.write_str(s)
}
}