aboutsummaryrefslogtreecommitdiff
path: root/src/console.rs
blob: bcde05a7d695eacbbaedeb8b9ea9e53f18f43b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod interface {
	use core::fmt;
	pub trait Write {
		fn write_char(&self, c: char);
		fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
		fn flush(&self);
	}

	pub trait Statistics {
		fn chars_written(&self) -> usize { 0 }
	}

	pub trait All: Write + Statistics {}
}

pub fn console() -> &'static crate::uart::Uart {
	&crate::uart::UART_WRITER
}