Still a lot of bugs :(

This commit is contained in:
Yifan Wu 2022-03-04 09:02:32 -08:00
parent 704eae3bb0
commit 26f44233f6
27 changed files with 308 additions and 95 deletions

View file

@ -1,12 +1,14 @@
use crate::drivers::chardev::{CharDevice, UART};
use core::fmt::{self, Write};
use crate::sbi::console_putchar;
struct Stdout;
impl Write for Stdout {
fn write_str(&mut self, s: &str) -> fmt::Result {
for c in s.chars() {
UART.write(c as u8);
//UART.write(c as u8);
console_putchar(c as usize);
}
Ok(())
}