We should disable sie before trapping back to user.

This commit is contained in:
Yifan Wu 2022-03-10 16:27:05 -08:00
parent 26f44233f6
commit ba611a1458
8 changed files with 43 additions and 33 deletions

View file

@ -14,7 +14,7 @@ impl File for Stdin {
}
fn read(&self, mut user_buf: UserBuffer) -> usize {
assert_eq!(user_buf.len(), 1);
println!("before UART.read() in Stdin::read()");
//println!("before UART.read() in Stdin::read()");
let ch = UART.read();
unsafe {
user_buf.buffers[0].as_mut_ptr().write_volatile(ch);