summaryrefslogtreecommitdiff
path: root/kernel/src/vga_text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/vga_text.rs')
-rw-r--r--kernel/src/vga_text.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/src/vga_text.rs b/kernel/src/vga_text.rs
index ef488e9..5298da7 100644
--- a/kernel/src/vga_text.rs
+++ b/kernel/src/vga_text.rs
@@ -35,10 +35,11 @@ impl CharState {
}
}
+#[no_mangle]
#[derive(Clone, Copy)]
pub struct VgaChar {
+ pub byte: u8,
pub state: CharState,
- pub byte: u8
}
impl VgaChar {
@@ -57,7 +58,7 @@ impl OStream {
pub fn new() -> Self {
Self {
pos: (0, 0),
- cursor: 0xb8000 as *mut VgaChar,
+ cursor: Self::at(0),
state: CharState::from_colors(Color::White, Color::Black)
}
}
@@ -85,7 +86,7 @@ impl OStream {
self.compute_cursor()
}
- fn set_char(&mut self, c: VgaChar) {
+ pub fn set_char(&mut self, c: VgaChar) {
unsafe {self.cursor.write_volatile(c)}
}